Prepare for your Next Interview
This is a discussion on Reg:Joins within the DB2 forums, part of the Databases category; Can anyone explain me diference between left/right joins ........?...
|
|||
|
Re: Reg:Joins
When you begin building queries using OUTER JOIN, the SQL Standard considers the first table you name as the one on the "left," and the second table as the one on the "right." So, if you want all the rows from the first table and any matching rows from the second table, you'll use a LEFT OUTER JOIN. Conversely, if you want all the rows from the second table and any matching rows from the first table, you'll specify a RIGHT OUTER JOIN.
Since OUTER is an optional keywork here it is also called as Left/Right Joins. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Types of Joins in SQL | Adarsh B | SQL Server | 5 | 07-24-2008 03:21 AM |
| How the joins work in SQL | savitha_shankar | Database General | 11 | 07-15-2008 11:06 AM |
| Joins | udaykumarn | Oracle | 1 | 07-01-2008 11:15 PM |
| Types of Joins | jyoti_02 | SQL | 1 | 05-10-2008 07:53 AM |
| tell me the query using joins and count! | ramesh_vwk | SQL | 3 | 08-20-2007 05:42 AM |