LeetCode/릿코드-Combine Two Tables-MySQL

문제

풀이

  • Write a SQL query for a report that provides the following information for each person in the Person table, regardless if there is an address for each of those people

코드

# leetcode, combine two tables, mysql
SELECT P.FirstName, P.LastName, A.City, A.State
FROM Person as P
LEFT OUTER JOIN Address as A ON P.PersonId = A.PersonId

결과


출처 && 깃허브

leetcode
github

좋은 웹페이지 즐겨찾기