MySQL數據庫:合併結果集

合併結果集

union----合併結果集mysql

對合並後的結果集中的重複數據也會自動去重
select sName from students
union
select tName from Teachers;
若是不想去重 則使用 union all
select sName from students
union all
select tName from Teachers;
相關文章
相關標籤/搜索