zoukankan      html  css  js  c++  java
  • Oracle之q操作符

    Oracle本身默认的是单引号,但是在大家写存储过程或者写SQL语句时,有时候需要拼SQL或者是SQL的值里需要传入含单引号的值,此时就需要使用两个单引号''''来进行转义,其实oracle本身提供了这种转换默认单引号为其他标识的方法那就是——"q"
    q [Oracle's quote operator]

    q'c text-to-be-quoted c'
    c is a single character (called the quote delimiter).

    With the «quote operator» apostrophes don't have to be doubled:

    SQL> select q'#Oracle's quote operator#' from dual;

    Q'#ORACLE'SQUOTEOPERATO
    -----------------------
    Oracle's quote operator

    begin
      execute immediate q'#select * from abc#';
    end;
  • 相关阅读:
    奈良有鹿
    Luogu P1892 团伙
    Luogu P1330 封锁阳光大学
    java读取property文件
    collection
    testNG学习
    maven项目学习
    Android.mk详解二
    sdk开发经验
    工作经验
  • 原文地址:https://www.cnblogs.com/pekkle/p/6568764.html
Copyright © 2011-2022 走看看