SQL

[leetCode] # 1378

빛날희- 2023. 8. 1. 23:13

문제 - Replace Employee ID With The Unique Identifier

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

 

Replace Employee ID With The Unique Identifier - LeetCode

Can you solve this real interview question? Replace Employee ID With The Unique Identifier - Table: Employees +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | name | varchar | +---------------+---------+ In SQL,

leetcode.com

Show the unique ID of each user, If a user does not have a unique ID replace just show null.

 

작성 답안

select eu.unique_id, e.name 
from employees as e 
left join employeeUNI as eu
on e.id = eu.id

 

리뷰

-