/* union/union all運算:返回兩個結果集的並集,即將兩個查詢的結果集進行合併。
union all:不過濾重複資料。
union:過濾重複資料
*/select name from driver_info where firm_id = '0'
union all
select name from driver_info where firm_id = '914';
select name from driver_info where firm_id = '0'
union
select name from driver_info where firm_id = '914';
/* intersect運算:返回兩個結果集的交集,即取兩個結果集中相同的部分。會過濾重複結果集*/
select name from driver_info where firm_id = '0'
intersect
select name from driver_info where firm_id = '914';
/* minus運算:返回第乙個結果集與第二個結果集中不相同的部分資料。*/
select name from driver_info where firm_id = '0'
minus
select name from driver_info where firm_id = '914';
交集並集差集
1 內連線 select from student a inner join sc b on a.sno b.sno 左連線 select from student a left join sc b on a.sno b.sno 差集 select sno from student except s...
shell bash 交集 並集 差集
方法一 直接用檔名 取兩個文字檔案的並集 交集 差集 並 sort m sort file1 uniq sort file2 uniq uniq 交 sort m sort file1 uniq sort file2 uniq uniq d 差 file1 file2 sort m sort fil...
PHP 交集 並集 差集
array flip array splice 並集 array merge 過濾 array filter 去重 array unique 差集 array diff array diff 函式返回兩個陣列的差集陣列。該陣列包括了所有在被比較的陣列中,但是不在任何其他引數陣列中的鍵值。a1 arr...