Answers for "sql self join"

SQL
2

self join in sql server

/* SELF JOIN - Joining a table with itself is called as self join.
  It is classified under any type of join.
  INNER JOIN
  OUTER JOIN
CROSS JOIN. */
SELECT Column_List
FROM Left_Table_Name AS Alias_Name
JOIN_TYPE Right_Table_Name AS Alias_Name
ON Alias_Name.Column_List [Operator] Alias_Name.Column_List

/* Example*/
SELECT E.Name AS Employee, M.Name AS Manager
FROM tblEmployee E
LEFT JOIN tblEmployee M
ON E.ManagerID = M.EmployeeID
Posted by: Guest on June-16-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language