oracle判斷含有特殊字符 Oracle查詢表中指定字段的數(shù)據(jù)是否含有某個字符?
Oracle查詢表中指定字段的數(shù)據(jù)是否含有某個字符?Select*from tab where col1 like%a%這是為了查詢字段col1是否包含字母a1,create test table,c
Oracle查詢表中指定字段的數(shù)據(jù)是否含有某個字符?
Select*from tab where col1 like%a%
這是為了查詢字段col1是否包含字母a
1,create test table,
create table testIsnum(ID number,值VARCHAR2(20))
2個isnum值(1,“a”)
插入測試isnum值(2329)
插入測試isnum值(4,“15”)
插入測試isnum值(6,“2C”)
提交
3個isnum T,
4。編寫SQL,判斷值字段,將內(nèi)容記錄為一個數(shù)字,
選擇T.*,
case
當(dāng)不喜歡regexp時(值,“D”),然后
“yes”
否則
“no”
結(jié)束為“number”
來自testisnum T