Oracle 关键字 escape
2012-07-08 22:33
204 查看
escape
escape是转义字符的关键字,用于转义通配符,提取字段字符里有通配符值的记录。
select f.*
from temp_ltao f
where b like '字符串' escape '/';
将字符串中/后面的字符转义。
// 转义/
/% 转义%
/_ 转义_
例如:
select f.*,f.rowid
from temp_ltao f
where b like '%/%%' escape '/'; --转义第二个%
但需要注意'例外,字符'还是需要用两个''来代替字符串中的单引号
例如:
select * from t_char where a like 'a\'b' escape '\';
ERROR:ORA-01756: quoted string not properly terminated
正确:
select * from t_char where a like 'a''b'
escape是转义字符的关键字,用于转义通配符,提取字段字符里有通配符值的记录。
select f.*
from temp_ltao f
where b like '字符串' escape '/';
将字符串中/后面的字符转义。
// 转义/
/% 转义%
/_ 转义_
例如:
select f.*,f.rowid
from temp_ltao f
where b like '%/%%' escape '/'; --转义第二个%
但需要注意'例外,字符'还是需要用两个''来代替字符串中的单引号
例如:
select * from t_char where a like 'a\'b' escape '\';
ERROR:ORA-01756: quoted string not properly terminated
正确:
select * from t_char where a like 'a''b'
相关文章推荐
- oracle中escape关键字解析
- ORACLE的ESCAPE关键字
- ORACLE中ESCAPE关键字用法
- ORACLE中ESCAPE关键字用法 换字符用法
- Oracle中使用escape关键字实现like匹配特殊字符,以及&字符的转义
- Oracle之escape关键字(转义字符)
- ORACLE中ESCAPE关键字用法,通配符使用
- 今天说说Oracle中的字符转义问题吧——escape关键字
- ORACLE中ESCAPE关键字用法
- Oracle escape 关键字
- Oracle中escape关键字的用法
- oracle中escape关键字用法
- Oracle中使用escape关键字实现like匹配特殊字符,以及&字符的转义
- oracle 中escape 关键字用法
- ORACLE中ESCAPE关键字用法
- ORACLE中ESCAPE关键字用法
- Oracle中使用escape关键字实现like匹配特殊字符,以及&字符的转义
- ORACLE中ESCAPE关键字用法 换字符用法
- 设置属性时,注意Oracle中的关键字...
- 【Oracle】Having关键字的使用,删除重复数据但保留一条