LEFT OUTER JOINS
Let take we have two tables A and B. The left outer joins will return all the rows from the left table A in conjunction with the matching rows from the right table B. In case there are no columns matching in table B, it returns NULL values.
Example:
There will be 122 rows returned (there are some departments without employees to be assigned to so there are entries with NULL values in columns FIRST_NAME, LAST_NAME)
If we just change left and right table the result will be different:
There are 107 rows returned (number of rows present in table EMPLOYEES)
There are 107 rows returned (number of rows present in table EMPLOYEES)
RIGHT OUTER JOINS
I am taking again two tables A and B. The right outer joins will return all the rows from the left table B in conjunction with the matching rows from the right table A. In case there are no columns matching in table A, it returns NULL values. Example:
There will be 122 rows returned
If we change the table places will get different result
`There will be 107 rows returned (number of rows in EMPLOYEES table)
FULL OUTER JOINS
It combines both left outer and the right outer joins together.
There will be 123 rows returned (there are some departments without employees to be assigned to so there are entries with NULL values in columns LAST_NAME, SALARY )
No comments:
Post a Comment