合并結果集
union----合并結果集
對合并后的結果集中的重復資料也會自動去重
select sName from students
union
select tName from Teachers;
如果不想去重 則使用 union all
select sName from students
union all
select tName from Teachers;
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/103148.html
標籤:MySQL
上一篇:MySQL資料庫:聚合函式的使用
下一篇:MySQL資料庫:運算子
