Click here to Skip to main content
15,920,005 members
Home / Discussions / Database
   

Database

 
GeneralRe: Help with SQL query Pin
brdavid28-Jun-04 12:04
brdavid28-Jun-04 12:04 
GeneralRe: Help with SQL query Pin
Michael Potter29-Jun-04 8:55
Michael Potter29-Jun-04 8:55 
GeneralRe: Help with SQL query Pin
brdavid30-Jun-04 2:37
brdavid30-Jun-04 2:37 
GeneralRe: Help with SQL query Pin
Grimolfr28-Jun-04 9:58
Grimolfr28-Jun-04 9:58 
GeneralInserting Rows... Pin
Sai197125-Jun-04 19:59
Sai197125-Jun-04 19:59 
GeneralRe: Inserting Rows... Pin
Rein Hillmann26-Jun-04 22:11
Rein Hillmann26-Jun-04 22:11 
QuestionHow Can I Join more than two tables in SQL Pin
JawedVikia8024-Jun-04 21:40
JawedVikia8024-Jun-04 21:40 
AnswerRe: How Can I Join more than two tables in SQL Pin
Colin Angus Mackay24-Jun-04 22:03
Colin Angus Mackay24-Jun-04 22:03 
JawedVikia80 wrote:
How Can I Join more than two tables in SQL.

Same way as you join two tables, just keep using joins until you've joined all the tables you need.

For Example:
SELECT TableA.ID as AID, TableB.ID as BID, TableC.ID as CID
FROM TableA
INNER JOIN TableB ON TableA.ID = TableB.AID
INNER JOIN TableC ON TableB.ID = TableC.BID


This example supposes there are one-to-many relationships between TableA & TableB and also between TableB & TableC. And that TableB has a foreign key to tableA called AID, and also TableC has a foreign key to TableB called BID

Does this help?


"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar

The Second EuroCPian Event will be in Brussels on the 4th of September

Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!

My Blog


AnswerRe: How Can I Join more than two tables in SQL Pin
wgdesigner25-Jun-04 1:38
wgdesigner25-Jun-04 1:38 
GeneralConcurrency Pin
IamADotNetGuy24-Jun-04 10:04
IamADotNetGuy24-Jun-04 10:04 
GeneralRe: Concurrency Pin
Rein Hillmann26-Jun-04 22:13
Rein Hillmann26-Jun-04 22:13 
GeneralRe: Concurrency Pin
Grimolfr28-Jun-04 7:56
Grimolfr28-Jun-04 7:56 
GeneralRe: Concurrency Pin
IamADotNetGuy28-Jun-04 8:07
IamADotNetGuy28-Jun-04 8:07 
GeneralSQL Query Pin
Guinness4Strength24-Jun-04 9:39
Guinness4Strength24-Jun-04 9:39 
GeneralRe: SQL Query Pin
Michael Potter25-Jun-04 3:32
Michael Potter25-Jun-04 3:32 
Generalproblem: records appear twice in dataset Pin
sharonz24-Jun-04 6:30
sharonz24-Jun-04 6:30 
GeneralRe: problem: records appear twice in dataset Pin
IamADotNetGuy28-Jun-04 10:43
IamADotNetGuy28-Jun-04 10:43 
GeneralVery easy question Pin
Guinness4Strength24-Jun-04 5:57
Guinness4Strength24-Jun-04 5:57 
GeneralRe: Very easy question Pin
Colin Angus Mackay24-Jun-04 6:14
Colin Angus Mackay24-Jun-04 6:14 
GeneralRe: Very easy question Pin
Guinness4Strength24-Jun-04 6:29
Guinness4Strength24-Jun-04 6:29 
GeneralRe: Very easy question Pin
Steven Campbell24-Jun-04 7:23
Steven Campbell24-Jun-04 7:23 
GeneralRe: Very easy question Pin
Snorri Kristjansson27-Jun-04 22:46
professionalSnorri Kristjansson27-Jun-04 22:46 
GeneralRe: Very easy question Pin
Grimolfr28-Jun-04 8:10
Grimolfr28-Jun-04 8:10 
Generaldatabase Error Pin
Anonymous24-Jun-04 0:50
Anonymous24-Jun-04 0:50 
Generaldouble click on the row of datagrid and retrieve the data from the SQL server Pin
viviansm23-Jun-04 20:47
viviansm23-Jun-04 20:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.