<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Decode360's Blog

    業(yè)精于勤而荒于嬉 QQ:150355677 MSN:decode360@hotmail.com

      BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 ::  :: 管理 ::
      397 隨筆 :: 33 文章 :: 29 評(píng)論 :: 0 Trackbacks
    sqlterminator
    ?
    ?
    SQLPLUS的sqlterminator參數(shù)可以在后面跟3個(gè)東西,分別是ON、OFF和character
    ?
    SQL> set sqlterminator ON|OFF|c
    ?
    c specifies the character that ends an SQL statement. The default is the semicolon (;).
    The sqlterminator cannot be alpha numeric.
    ?
    ?
    舉例如下:
    ?
    SQL> set sqlterminator off
    SQL> show sqlterminator
    sqlterminator OFF
    SQL> select * from dual
    ? 2? ;
    ? 3? /
    ;
    *
    ERROR at line 2:
    ORA-00911: invalid character

    SQL> select * from dual
    ? 2? /
    ?
    D
    -
    X
    ?
    --關(guān)閉之后僅能以"/"來執(zhí)行該SQL語句
    ?
    SQL> set sqlterminator on
    SQL> show sqlterminator
    sqlterminator ";" (hex 3b)
    SQL> select * from dual
    ? 2? ;
    ?
    D
    -
    X
    ?
    --打開后默認(rèn)以";"來結(jié)尾
    ?
    SQL> set sqlterminator !
    SQL> show sqlterminator
    sqlterminator "!" (hex 21)
    SQL> select * from dual !
    ?
    D
    -
    X

    ?
    --設(shè)置其他字符作為sqlterminator
    ?
    SQL> set sqlterminator on
    SQL> show sqlterminator
    sqlterminator ";" (hex 3b)
    ?
    --設(shè)置on之后,依舊改為默認(rèn)結(jié)束代碼";"
    ?
    SQL> set sqlterminator OFF
    SQL> update T1
    ? 2? set A =
    ? 3? 'DECLARE
    ? 4? RID NUMBER := 0 ;
    ? 5? BEGIN
    ? 6? SELECT 1 INTO RID
    ? 7? FROM dual;
    ? 8? END ;'
    ? 9? where B= 'xxxx'
    10? /

    1 row updated.

    SQL> commit
    ? 2? /

    Commit complete.

    SQL> set sqlterminator ON
    ?
    --應(yīng)用(插入帶";"的字符串)
    ?
    ?
    ?

    ?
    ?
    escape

    ?
    SQLPLUS的escape參數(shù)后面可以跟4個(gè)東西,分別是ON、OFF、character和"\"
    ?
    SQL> SET ESC[APE] {\| c|ON|OFF}
    Defines the character you enter as the escape character. OFF undefinesthe escape character. ON enables the escape character. ON changes thevalue of c back to the default "\".
    ?
    ?
    簡(jiǎn)單舉例:
    ?
    SQL> set escape on
    SQL> show escape
    escape "\" (hex 5c)
    SQL> select '\' from dual;

    '
    -

    SQL> select '\\' from dual;

    '
    -
    \

    SQL> select '\\\' from dual;

    '
    -
    \

    SQL> select '\\\\' from dual;

    '\
    --
    \\
    ?
    --"\"為轉(zhuǎn)義符,轉(zhuǎn)移任意一個(gè)它后面的字符
    ?
    SQL> set escape !
    SQL> select '\\' from dual;
    ?
    '\
    --
    \\
    ?
    SQL> select '!\' from dual;
    ?
    '
    -
    \
    ?
    --使用其他字符作為轉(zhuǎn)義
    ?
    ?
    ?
    注意:這里的escape參數(shù)與SQL中的escape函數(shù)完全不同
    ?
    ?
    ?
    posted on 2009-03-30 21:54 decode360 閱讀(300) 評(píng)論(0)  編輯  收藏 所屬分類: 05.SQL
    主站蜘蛛池模板: 中文字幕专区在线亚洲| 久久精品国产亚洲AV果冻传媒| 亚洲黄色片在线观看| 中文字幕在线免费观看视频| 久久精品亚洲福利| 国产高清对白在线观看免费91| 免费A级毛片无码A∨中文字幕下载| 三上悠亚亚洲一区高清| 久久成人18免费网站| 亚洲精品无码av人在线观看| 免费91麻豆精品国产自产在线观看| 亚洲美女免费视频| 亚洲国产精品成人综合色在线婷婷| www.黄色免费网站| 亚洲av女电影网| 最近中文字幕大全中文字幕免费| 亚洲精品线路一在线观看 | 亚洲午夜无码片在线观看影院猛| 羞羞网站在线免费观看| 欧洲黑大粗无码免费| 18亚洲男同志videos网站| 国产免费一区二区三区| 亚洲一区二区成人| 国产成人免费爽爽爽视频| 国内成人精品亚洲日本语音| 无码免费午夜福利片在线 | 亚洲区视频在线观看| 国产猛男猛女超爽免费视频| 亚洲色欲www综合网| 免费精品一区二区三区在线观看| 亚洲中文字幕一二三四区苍井空| 91人成网站色www免费下载| 中中文字幕亚洲无线码| 亚洲国产精品丝袜在线观看| 日本亚洲高清乱码中文在线观看| 亚洲一区爱区精品无码| 日韩视频在线精品视频免费观看| 人妻无码中文字幕免费视频蜜桃| 久久亚洲AV无码精品色午夜| 免费不卡中文字幕在线| 一级做性色a爰片久久毛片免费|