Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.52 KB

1378.Replace_Employee_ID_With_The_Unique_Identifer(Easy).md

File metadata and controls

26 lines (18 loc) · 1.52 KB

1378. Replace Employee ID With The Unique Identifier (Easy)

Date and Time: Mar 14, 2025, 00:40 (EST)

Link: https://leetcode.com/problems/replace-employee-id-with-the-unique-identifier


Walk-through:

SELECT ... FROM first_table LEFT JOIN second_table ON ...

retrieves all rows from the first table, and the matching rows from the 2nd table based on the same column.


Solution:

SELECT EmployeeUNI.unique_id, Employees.name
FROM Employees 
LEFT JOIN EmployeeUNI ON Employees.id = EmployeeUNI.id;

CC BY-NC-SABY: credit must be given to the creatorNC: Only noncommercial uses of the work are permittedSA: Adaptations must be shared under the same terms