题解 | #纠错4#

纠错4

http://www.nowcoder.com/practice/bde1451b91084c8cab467387a0e0969c

SELECT cust_name, cust_contact, cust_email FROM Customers UNION SELECT cust_name, cust_contact, cust_email FROM Customers WHERE cust_state = 'IL' and cust_state = 'MI' ORDER BY cust_name;

或者 SELECT cust_name, cust_contact, cust_email FROM Customers WHERE cust_state = 'MI' UNION SELECT cust_name, cust_contact, cust_email FROM Customers WHERE cust_state = 'IL' ORDER BY cust_name;

全部评论
第一种方法中,union后的where条件是不有点不妥,应该使用OR链接两条件
点赞 回复 分享
发布于 2022-04-24 14:28

相关推荐

不知道怎么取名字_:28届都开始出来找机会了,看来哪里都卷
实习简历求拷打
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务