Solved

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

Posted on 2007-12-05
2
1,063 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 143

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 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