취미가 좋다
175. Combine Two Tables 본문
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
SELECT P.FirstName, P.LastName, A.City, A.State
FROM Person P
LEFT JOIN ADDRESS A
ON P.PersonID = A.PersonID
- SELECT 할 때, P 혹은 A 를 입력하지 않고 그대로 FirstName, LastName, City, State 를 입력해도 된다.
'SQL 문제풀이 > Leetcode' 카테고리의 다른 글
178. Rank Scores (0) | 2021.09.06 |
---|---|
182. Duplicate Emails (0) | 2021.09.04 |
181. Employees Earning More Than Their Managers (0) | 2021.09.04 |
177. Nth Highest Salary (0) | 2021.08.13 |
176. Second Highest Salary (0) | 2021.08.13 |
Comments