SELECT table1.field1 FROM table1 ORDER BY table1.field1
UNION
SELECT table2.field1 FROM table2 ORDER BY table2.field1
引发异常
注意:正在MS Access Jet数据库引擎上尝试这样做
拉莫斯之舞
浏览 1679回答 3
3回答
素胚勾勒不出你
有时您需要ORDER BY在每个部分中将与组合在一起UNION。在这种情况下SELECT * FROM ( SELECT table1.field1 FROM table1 ORDER BY table1.field1) DUMMY_ALIAS1UNION ALLSELECT * FROM( SELECT table2.field1 FROM table2 ORDER BY table2.field1) DUMMY_ALIAS2