题解 | #纠错4#

纠错4

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

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多条数据连接查询的时候,两个select语句之间不需要写分号,若要使用ORDER BY排序,只需要在末尾写一个排序语句就可以,不用写两个.

全部评论

相关推荐

2025-11-07 11:05
已编辑
腾讯_csig_软件开发(实习员工)
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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