본문 바로가기
Programming/LeetCode

[LeetCode] Combine Two Tables (MySQL)

by 데이터현 2022. 3. 31.

https://leetcode.com/problems/combine-two-tables/

 

Combine Two Tables - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

personId로 조인하는 문제

outer join을 하면 된다.

SELECT firstName, lastName, city, state
FROM Person p LEFT JOIN Address a 
ON p.personId = a.personId
;

 

댓글