Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL Server
Expertise: Beginner
Mar 24, 1997

Differences Between Join Types

Question:
What are the differences between LEFT, RIGHT, INNER and OUTER JOINS?

Answer:
An INNER JOIN is the most common type: It combines all the data from the tables specified and eliminates the rows that do not meet the criteria specified in the WHERE clause.

LEFT and RIGHT JOINs are types of OUTER JOINs. In general, an OUTER JOIN is one that preserves all the rows in one of the tables specified in the FROM clause, even if there are no matching rows with the other table. A LEFT OUTER JOIN means that the preserved table is the one specified on the left side of the equation; a RIGHT OUTER JOIN means that the preserved table is the one specified on the right side of the equation. A FULL OUTER JOIN preserves the tables on both sides of the equation.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date