Oracle中like查询下划线等特殊字符的处理
2013-09-28 15:40
447 查看
You can include the actual characters "%" or "_" in the pattern by using the
literally in the pattern, rather than as a special pattern matching character.
To search for employees with the pattern 'A_B' in their name:
The
ESCAPEclause, which identifies the escape character. If the escape character appears in the pattern before the character "%" or "_" then Oracle interprets this character
literally in the pattern, rather than as a special pattern matching character.
To search for employees with the pattern 'A_B' in their name:
SELECT last_name
FROM employees
WHERE last_name LIKE '%A\_B%' ESCAPE '\';
The
ESCAPEclause identifies the backslash (\) as the escape character. In the pattern, the escape character precedes the underscore (_). This causes Oracle to interpret the underscore literally, rather than as a special pattern matching character.
相关文章推荐
- Oracle中like查询下划线等特殊字符的处理
- Oracle中like查询下划线等特殊字符的处理
- Oracle中like查询下划线等特殊字符的处理
- Oracle中like查询下划线等特殊字符的处理
- Oracle中like查询下划线等特殊字符的处理
- Oracle中like查询下划线等特殊字符的处理
- Oracle中like查询下划线等特殊字符的处理
- like查询特殊字符,用转义符处理
- LIKE查询中特殊字符的特殊处理
- oracle & 和 ' 特殊字符处理 ( like 'GAC/&_%' escape '&'; 这里面的 / 居然将& 转义了 为什么?)
- 模糊查询某个字段除以100去查询,处理特殊字符和0值
- Oracle 特殊字符处理 查找 替换
- Oracle命令行导入导出(用户名或密码包含特殊字符的特殊情况处理)
- SQL中like查询时,应该注意那些特殊字符?
- SqlServer中模糊查询对于特殊字符的处理
- Oracle用户密码含有特殊字符应当如何处理
- 我的字符跑哪里去了?——Oracle中特殊字符处理一例
- oracle使用like匹配特殊字符解决办法
- 实现模糊查询时对特殊字符进行处理和对查询结果进行处理
- sql特殊字符的模糊查询处理