oracle 資料篩選

2022-02-16 03:28:05 字數 614 閱讀 4655

一:當統一社會信用**或者工商註冊號兩個欄位中,有的時候只有乙個字段含有資料,但是所取的值必須要擁有字段,這個時候,語句為下:

select

t.entname,

case

when t.uniscid is

null

then

t.regno

else

t.uniscid

endas

編碼或註冊號,

from

reg_marpripinfo t

case

when 當該字段為空的時候 then 取另外乙個字段 else 取當前字段 end

二:篩選某個欄位中不帶中文的所有資料

select

*from

table

where regexp_substr(check,'

[0-9]+

') is

notnull

可以篩選出不帶中文

select

*from 表名where regexp_substr(所選字段,'

[0-9]+

') is

notnull

oracle資料庫篩選備份

篩選備份 mdata01資料導到sdata02 1.給使用者授予許可權 grant connect,resource,dba to username grant read,write on directory dpdata to username 2.檢視資料庫dba directories目錄 s...

資料的篩選

excel2016中提供了3種資料的篩選操作,即 自動篩選 自定義篩選 和 高階篩選 自動篩選 自動篩選 一般用於簡單的條件篩選,篩選時將不滿足條件的資料暫時隱藏起來,只顯示符合條件的資料 對工作表中的資料進行自動篩選的具體步驟如下 指定資料的篩選 開啟工作表,選中單元格a2 l11,切換到 資料 ...

MySQL WHERE 篩選資料

select field1,field2 from table name where field1 value1 and or field2 value2運算子支援 in link regexp 邏輯操作支援 and or 且 and 優先順序大於 or 結構 create table user i...