MySQL UNION 用法

來源:https://dev.mysql.com/doc/refman/5.7/en/union.html

(SELECT a FROM t1 WHERE a=10 AND B=1)
UNION
(SELECT a FROM t2 WHERE a=11 AND B=2)
ORDER BY a LIMIT 10;

 

本篇發表於 程式設計, 電腦資訊。將永久鏈結加入書籤。