InterviewSolution
Saved Bookmarks
| 1. |
What is a Self-Join? |
|
Answer» A self JOIN is a case of REGULAR join where a table is joined to itself BASED on some RELATION between its own column(s). Self-join uses the INNER JOIN or LEFT JOIN clause and a table alias is used to assign different names to the table within the query. SELECT A.emp_id AS "Emp_ID",A.emp_name AS "Employee",B.emp_id AS "Sup_ID",B.emp_name AS "Supervisor"FROM employee A, employee BWHERE A.emp_sup = B.emp_id; |
|