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;
注意事项: SQL语句中使用union 时,只能有一个order by ,且必须放在最后

京公网安备 11010502036488号