Oracle結果集合並

2021-08-14 21:38:53 字數 1018 閱讀 9199

--並集 把多個查詢的結果合併起來

--列數要相同

--對應列的資料型別要相容

select * from stu

union

select s_id,s_name from student;

--不會去掉重複值

select * from stu

union all

select s_id,s_name from student;

--交集,多個查詢結果的共同部分

select * from stu

intersect

select s_id,s_name from student;

--補集,有順序,將a結果中,和b結果重合的部分去掉,剩下的部分

select s_id,s_name from stu

minus

select s_id,s_name from student;

select s_id,s_name from student

minus

select * from stu;

select * from stu

minus

(select s_id,s_name from student;

minus

select s_id,s_name from student);

--orber by 子句,寫在最後,使用第乙個查詢的列名或者別名

select s_id,s_name from stu

union

select s_id,s_name from student

order by s_name;

--orber by 子句,按照列索引排序,2對應第乙個查詢的第2列(stu.s_name)

select s_id,s_name from stu

union

select s_id,s_name from student

order by 2;

tesseract orc 合併識別結果

在實際使用 tesseract orc 識別庫的時候,初次製作的識別庫很有可能識別率不太理想,需要後期慢慢補充 本文演示如何將多個修正過的box檔案合併成乙個識別庫。首先,需要樣本.tif檔案,位置檔案.box 只要有這兩個檔案在,就可以合併字典 image.font.1.tif image.fon...

Mysql合併查詢結果

本文通過例項介紹mysql中的group concat函式的使用方法,比如select group concat name mysql中group concat函式 完整的語法如下 group concat distinct 要連線的字段 order by asc desc 排序字段 separat...

SQL 結果集合操作

為了配合測試,特地建了兩個表,並且新增了一些測試資料,其中重覆記錄為東吳的人物。表 person 1魏國人物 表 person 2蜀國人物 a union形成並集 union可以對兩個或多個結果集進行連線,形成 並集 子結果集所有的記錄組合在一起形成新的結果集。1 限定條件 要是用union來連線結...