题解 | 使用union联合查询时默认返回的字段名
组合 Products 表中的产品名称和 Customers 表中的顾客名称
https://www.nowcoder.com/practice/461077c0ba0f473abecf5ee79c632acd
# 由于涉及到的两表之间无直接的连接关系,要合并结果使用union # union联合查询默认返回的字段名是第一条查询语句的字段名,因此排序时要注意使用prod_name字段 select prod_name from Products union select * from Customers order by prod_name;