Try the below
SELECT t1.EmployeeName AS Manager, t2.EmployeeID as EmployeeName
FROM Employee t1
LEFT JOIN Employee t2 ON t1.ManagerID=t2.EmployeeID
More Related Contents:
- SQL Query needed for fetch value from Two identical table but not fully identical table
- sql query to modify the selected value from database [closed]
- Calculate Average of the largest values in multiple columns
- Storing JSON in database vs. having a new column for each key
- SQL: Repeat a result row multiple times, and number the rows
- How do I decide when to use right joins/left joins or inner joins Or how to determine which table is on which side?
- Why do results from a SQL query not come back in the order I expect?
- When to use SELECT … FOR UPDATE?
- Best practices for SQL varchar column length [closed]
- How to transpose rows to columns with large amount of the data in BigQuery/SQL?
- how to cast the hexadecimal to varchar(datetime)?
- Equivalent of MySQL ON DUPLICATE KEY UPDATE in Sql Server
- Why in SQL NULL can’t match with NULL?
- Convert SQL Server query to MySQL [duplicate]
- comparison of truncate vs delete in mysql/sqlserver [duplicate]
- Using column alias in WHERE clause of MySQL query produces an error
- Cannot delete or update a parent row: a foreign key constraint fails
- Using an Alias in SQL Calculations
- How do I select an entire row which has the largest ID in the table?
- MySQL/MariaDB – order by inside subquery
- Can MySQL replace multiple characters?
- Using ORDER BY and GROUP BY together
- MySQL Pivot Table Column Data as Rows
- updating columns with a sequence number mysql
- MySQL, Concatenate two columns
- Select a column with a keyword name
- ERROR 1148: The used command is not allowed with this MySQL version
- Use Composite Primary Key as Foreign Key
- What happens when I exhaust a bigint generated key? How to handle it?
- is there a length limit to group_concat or another reason why it would not work on a text field