比如要查寻名字是ha%ha的用户
select * from user where name like 'ha\%ha' escape '\';
select * from user where name like 'haA%ha' escape 'A';
这两句效果是一样的吗?
select * from user where name like 'ha\%ha' escape '\';
select * from user where name like 'haA%ha' escape 'A';
这两句效果是一样的吗?
解决方案 »
- 请教一个sql语句
- The Network Adapter could not establish the connection
- oracle插入数据忽略重复,继续执行下一条语句
- 请教这个查询该怎么写
- 如何检测表的修改?
- 对clob字段的查询可用dbms_lob.instr(clob_field,'some text',1,1) > 0作为查询条件,但好像直接用instr(clob_field,'some text',1,1) >
- 在windows nt环境下安装完oracle数据库,运行net8 easy config的时候出现错误,错误信息是……
- 一个SQL写法,每个班级成绩排名前10的学生。
- 创建database link无法识别域名
- Oracle 数据库查询问题求解答
- 数据库备分还原
- ORACLE11g问题
2 (case when 'ha%ha' like 'ha\%ha' escape '\' then 1 else 0 end) pattern1,
3 (case when 'ha%ha' like 'haA%ha' escape 'A' then 1 else 0 end) pattern2
4* from dual
SQL> / PATTERN1 PATTERN2
---------- ----------
1 1