pl/Sql如何查询字符串包括%
pl/Sql如何查询字符串包括%, 例如:TABLE a columnA '222' '33%44' 如何查询表a中columnA字段中哪些行包含'%' 谢谢
select * from a where columna like '%/%%' escape '/' UP SELECT * from a WHERE columnA LIKE '%\%%' ESCAPE'\'; 其中,ESCAPE'\'表示:\为换码字符,匹配串中跟在\后面的字符%不再具有通配符的含义; 转义为普通的“%”字符。引用 select * from a where columna like '%/%%' escape '/' UP 楼上的方法管用,但是偶想问一个如果字符串里包含有'(单引号)的要怎么用Like查询啊?? select * from t1 where instr(f1,'%') != 0 ; 用正则表达式吧: select * from dual where 'tian%dd'like '%/%%' escape '/';引用 楼上的方法管用,但是偶想问一个如果字符串里包含有'(单引号)的要怎么用Like查询啊?? select * from t1 where instr(f1,'''') != 0;引用 楼上的方法管用,但是偶想问一个如果字符串里包含有'(单引号)的要怎么用Like查询啊?? where col1 like '%''%' 或 where col1 like '%'||chr(39)||'%' 或 where instr(col1,chr(39))>0 楼主用Oracle 正则试试 SQL code: with tt as ( select '33%44''' COL from dual ) select * from
相关问答:
大家帮忙看看这2个sql语句哪个查询的速度更快点。谢谢帮忙。比较着急。在做性能测试。 select * from 表A LEFT OUTER JOIN 表B ON (表A.id || ' ' =表B.id) ,表C , 表D, 表E Where其他条件 select * ......
表如下 教室ID 座位数 开始时间 结束时间 2009年1月1日 2009年1月2日 2009年1月3日 101 50 08:00 08:30 30 40 50 101 50 09:00 ......
原数据 商品 原价 打折方式1 折扣1 打折方式2 折扣2 笔记本 10000 NULL 0 NULL&nb ......
type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jas ......
我的Tblworkbill表的数据如下: id workbillno .................. 1 1 2 6 3 a1 4 c2 5 2 6 aa 7 ......