[LeetCode] 1378. Replace Employee ID With The Unique Identifier

Chobby·2025년 8월 14일
1

LeetCode

목록 보기
510/582

😎풀이

  1. Employees 테이블에서 name 조회
  2. EmployeeUNI 테이블을 Employees 테이블과 id를 기준으로 결합
  3. EmployeeUNI 테이블의 unique_id 조회
  4. 조회된 결괏값 반환환
SELECT u.unique_id, e.name
FROM Employees AS e
LEFT JOIN EmployeeUNI AS u
ON e.id = u.id
profile
내 지식을 공유할 수 있는 대담함

0개의 댓글