• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
小折腾
博客园    首页    新随笔    联系   管理    订阅  订阅

escape special characters in oracle

http://docs.oracle.com/cd/B10500_01/text.920/a96518/cqspcl.htm

https://forums.oracle.com/forums/thread.jspa?threadID=466604


SET ESCAPE ON;


Escape Characters

To query on words or symbols that have special meaning to query expressions such as and & or| accum, you must escape them. There are two ways to escape characters in a query expression:

Escape Character Description

{}

Use braces to escape a string of characters or symbols. Everything within a set of braces in considered part of the escape sequence.

When you use braces to escape a single character, the escaped character becomes a separate token in the query.

\

Use the backslash character to escape a single character or symbol. Only the character immediately following the backslash is escaped.

In the following examples, an escape sequence is necessary because each expression contains a Text operator or reserved symbol:

'AT\&T'
'{AT&T}'

'high\-voltage'
'{high-voltage}'


Note:

If you use braces to escape an individual character within a word, the character is escaped, but the word is broken into three tokens.

For example, a query written as high{-}voltage searches for high - voltage, with the space on either side of the hyphen.

 

 

 

 

 

 

 

 

 

 

posted @ 2011-11-23 18:31  小折腾  阅读(464)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3