Solved

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

Posted on 2007-12-05
2
1,066 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

690 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