• SQL 拼接 ‘’ 的处理


    用 '' '' (两个单引号代替)

    比如 :

    sys@LEOdb(194)> select 'alter database tempfile '''||name||''' drop ;' from v$tempfile;
    
    'ALTERDATABASETEMPFILE'''||NAME||'''DROP;'
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------
    alter database tempfile '+DATAC1/LEOdb/tempfile/temp.1461.900841159' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/auims3_tmp.1179.901536643' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/LEO_tmp.913.901536855' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/LEOhis_tmp.915.901536939' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/eimage_tmp.917.901536999' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/webuser_tmp.1475.902157001' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/LEO2_tmp.1477.902157105' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/LEOhis2_tmp.1479.902157169' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/eimage2_tmp.1481.902157567' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/ppf_tmp.1107.947784051' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/tab_livebos_tmp.1100.949074935' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/tab_sdx_tmp.1098.949075105' drop ;
    alter database tempfile '+DATAC1/LEOdb/tempfile/tab_stat_tmp.1093.949075261' drop ;
    alter database tempfile '+DATAC1/LEOdb/datafile/ostat_tmp.ora' drop ;
    alter database tempfile '+DATAC1/LEOdb/datafile/ods_tmp.ora' drop ;
    alter database tempfile '+DATAC1/LEOdb/datafile/dreport_tmp.ora' drop ;
    alter database tempfile '+DATAC1/LEOdb/datafile/dreport_tmp1.ora' drop ;
  • 相关阅读:
    【转】 java中Class对象详解和类名.class, class.forName(), getClass()区别
    106. Construct Binary Tree from Inorder and Postorder Traversal
    105. Construct Binary Tree from Preorder and Inorder Traversal
    107. Binary Tree Level Order Traversal II
    109. Convert Sorted List to Binary Search Tree
    108. Convert Sorted Array to Binary Search Tree
    110. Balanced Binary Tree
    STL容器迭代器失效问题讨论
    113. Path Sum II
    112. Path Sum
  • 原文地址:https://www.cnblogs.com/Leo-Cjh/p/13450933.html
Copyright © 2020-2023  润新知