자료구조 알고리즘/코딩테스트
[MySQL] left join, left outer join
내공얌냠
2022. 5. 27. 16:24
없음. 줄여쓰는 것임.
https://leetcode.com/problems/customers-who-never-order/
Customers Who Never Order - 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 name as Customers
from Customers as a
left outer join Orders as b
on a.id = b.customerId
where b.id is null
select c.name as Customers
from Customers c
left join Orders o
on c.id = o.CustomerId
where o.CustomerId IS NULL
Reference
http://gnujava.com/board/article_view.jsp?article_no=726&board_no=23&table_cd=EPAR06&table_no=06
GNUJAVA
제목없음 left join과 left outer join SQL문의 차이점 일반join과 outer join 의 가장 큰 차이점은 해당되지 않는 값을 가지고 오느냐 가지고 오지 않느냐의 차이입니다. table1 col1 | col2 ---------- usr1| a1 us
gnujava.com
728x90
반응형