I have a table with columns EmployeeID, EmployeeName, and ManagerID. ManagerID is a recursive FK of EmployeeID. I am trying to query the table so that the name of employees who are managers are provided. My train of thought is that an Employee would be a Manager if their EmployeeID is also a ManagerID. I set the ManagerID to be NOT NULL because that person would be the manager's manager. When I execute the query a blank manager column is returned.
SELECT EmployeeName AS Manager
FROM Employee E
WHERE E.EmployeeID=E.ManagerID AND
E.ManagerID <> null