This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT a.emp_id, a.name, a.manager_id, b.emp_id, b.name | |
FROM emp a, emp b | |
WHERE a.manager_id = b.emp_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT emp_name, dep_name | |
FROM emp | |
RIGHT OUTER JOIN department | |
on dep_id_pk = dep_id_fk ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT emp_name, dep_name | |
FROM emp | |
LEFT OUTER JOIN department | |
on dep_id_pk = dep_id_fk ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT emp_name, dep_name | |
FROM emp | |
INNER JOIN department | |
on dep_id_pk = dep_id_fk ; |