Prepare for your Next Interview
This is a discussion on What is the difference between self join and outer join? within the SQL forums, part of the Databases category; fitjfdgfjgifjgjijfngijgjdgjdigdhgudhgshfhfsfdshfudsruhdrusdurudr...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
Hi Swapna this is the answer for your question i think
Outer joins return all rows from at least one of the tables or views mentioned in the FROM clause, as long as those rows meet any WHERE or HAVING search conditions. All rows are retrieved from the left table referenced with a left outer join, and all rows from the right table referenced in a right outer join. All rows from both tables are returned in a full outer join A table can be joined to itself in a self-join. |
|
|||
|
Re: What is the difference between self join and outer join?
You can use outer join to get the leftovers where as self join is used to compare a table with itself. In self join we consider the same table as two tables bearing the alies names
|
|
|||
|
Re: What is the difference between self join and outer join?
SELF JOIN --is join of the same table to itself.
OUTER JOIN-- is join to another table to select non matching records also. it can be left outer or right outer join. |
|
|||
|
Re: What is the difference between self join and outer join?
Hi,
The Self Join is the concept joining the same table to it self, in that we use the alias concept to differ the tables. In the Outer join we can use 3 types left, right or full, we can use the same tables for the outer join also but there won't be any meaning for that. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| difference between Union All and full outer join | bvani | MY SQL | 5 | 10-23-2008 05:29 PM |
| difference between self join and correlated queries | poppumca | SQL | 3 | 07-26-2008 11:30 AM |
| SQL Server outer join | chitrab | SQL Server | 3 | 03-28-2008 04:51 AM |
| Outer Join Query Example | mailtos.ravi | SQL | 4 | 03-05-2008 04:34 AM |
| Writing query with LEFT OUTER JOIN | N SRIRAM K | Data Warehousing | 5 | 09-03-2007 06:08 AM |