Solved

Syntax to INNER JOIN and to LEFT OUTER JOIN using multi columns in SAME table....?

Posted on 2007-12-05
2
1,061 Views
Last Modified: 2009-07-29
Experts:

What is the correct syntax for INNER JOIN....and....LEFT OUTER JOIN...when trying to join TableA and TableB using multiple columns....? Let's say 3 different columns are used to JOIN TableA and TableB....can you give me the Syntax for BOTH ......INNER AND LEFT JOINS.....separately......

THANKS

MikeV
0
Comment
Question by:MIKE
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 20412270
for example:

SELECT ....
FROM tableA a
INNER JOIN tableB b
  ON a.col1 = b.col1
 AND a.col2 = b.col2
LEFT JOIN tableC c
  ON a.col1 = c.col1
 AND a.col2 = c.col2
0
 
LVL 17

Author Comment

by:MIKE
ID: 20412334
Thanks

MikeV
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now