首页 > 其他 > 详细

183. Customers Who Never Order

时间:2018-03-22 13:06:30      阅读:227      评论:0      收藏:0      [点我收藏+]

原题链接:https://leetcode.com/problems/customers-who-never-order/description/
做完这道题目我才发现,我跟不就不懂 in, exists, not in, not exists,exists 用都不会用:

# Write your MySQL query statement below
select Name as Customers from Customers where not exists (select CustomerId from Orders where Customers.Id = Orders.CustomerId);

select Name as Customers from Customers where 
Id not in (select CustomerId from Orders);

183. Customers Who Never Order

原文:https://www.cnblogs.com/optor/p/8622852.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!