zoukankan      html  css  js  c++  java
  • pl/sqlescape& quotation

    escape:

    1.使用 ESCAPE 关键字定义转义符。在模式中,当转义符置于通配符之前时,该通配符就解释为普通字符。

    2.ESCAPE 'escape_character' 
    允许在字符串中搜索通配符而不是将其作为通配符使用。escape_character 是放在通配符前表示此特殊用途的字符。 
    select * from a WHERE name LIKE '%/%ab' ESCAPE '/'


    结果为: 
    name 
    ---------- 
    11%ab 

    12%ab 

    quotation:

    Quotation marks can be nested in one of two ways. The first method is to double the quotation marks in the nested string. For example:

    NLS_DATE_FORMAT = '''Today is'' MM/DD/YYYY' 

    The second method is to alternate single and double quotation marks. For example:

    NLS_DATE_FORMAT = '"Today is" MM/DD/YYYY' 
    SQL> select '''Today is'' MM/DD/YYYY' from dual;

    '''TODAYIS''MM/DD/YYYY'
    -----------------------
    'Today is' MM/DD/YYYY

    SQL
    >  select '"Today is" MM/DD/YYYY' from dual;

    '"TODAYIS"MM/DD/YYYY'
    ---------------------
    "Today is" MM/DD/YYYY


  • 相关阅读:
    C#高级特性_Attribute
    C#高级特性_Lambda
    委托(delegate)
    C# 属性、索引
    C#中的interface
    枚举型Enum和结构型Stuct
    javascript学习笔记
    github page 和 hexo 搭建在线博客
    2015/9/22 开通博客园
    phoenix 入门
  • 原文地址:https://www.cnblogs.com/kelin1314/p/1922849.html
Copyright © 2011-2022 走看看