当想让输出的结果中字段带有单引号',

场景一:连续三个单引号'''

 select '''helin''' from dual;
---'helin'

场景二:拼接字段的结果集--连续4个单引号

select 'update ct_cust_info set cust_name =',
'''' || a.cust_name || '''',
'cust_address = ',
'''' || a.cust_address || '''',
'where cust_id = ',
'''' || a.cust_id || ''''
from (select cust_id, cust_name, CUST_ADDRESS
from ct_cust_info_crm
minus
select cust_id, cust_name, CUST_ADDRESS from ct_cust_info_billing1) a
--1 update ct_cust_info set cust_name = '++SFVBIEJJTkc=' cust_address = '++TEVWRUwgMzUsIDI1IENBTkFEQSBTUVVBUkUsIENBTkFSWSBXSEFSRiwgTE9ORE9OLCBFMTQgNUxR' where cust_id = '100321000000002243'
--2 update ct_cust_info set cust_name = '++RE9ORyBIQU8=' cust_address = '++TEVWRUwgMzUsIDI1IENBTkFEQSBTUVVBUkUsIENBTkFSWSBXSEFSRiwgTE9ORE9OLCBFMTQgNUxR' where cust_id = '100321000000002258'

场景三:和场景2一致,另一种写法:q'/string/'  中间的string表示任何字符

select
'update ct_cust_info set cust_name =',
q'/'/'|| a.cust_name ||q'/',/',
'cust_address = ',
q'/'/'|| a.cust_address ||q'/'/',
'where cust_id = ',
q'/'/'|| a.cust_id ||q'/';/'
from
(select cust_id,cust_name,CUST_ADDRESS from ct_cust_info_crm
minus
select cust_id,cust_name,CUST_ADDRESS from ct_cust_info_billing1) a

最新文章

  1. jsPanel插件Option总结
  2. stunnel-client
  3. php网络编程
  4. css中box-shadow阴影效果的使用
  5. velocity模板使用建议
  6. RealThinClient (RTC)是什么?
  7. HDU 4720 Naive and Silly Muggles 2013年四川省赛题
  8. sql server 存储过程、事务,增删改
  9. ServiceStack.Hello——跨平台.net REST api服务搭建
  10. 三、WCF的宿主
  11. Beautiful Paintings
  12. 使用Aes对称加密解密Web.Config数据库连接串
  13. 分享:使用 TypeScript 编写的游戏代码
  14. JavaScript构造函数原理
  15. 【原创+整理】简述何为调用约定,函数导出名以及extern C
  16. IntelliJ IDEA 下的svn配置及使用的非常详细的图文总结
  17. Cf Round #403 B. The Meeting Place Cannot Be Changed(二分答案)
  18. ps aux命令解析
  19. Verilog的一些系统任务(一)
  20. IOS-OC 编码建议

热门文章

  1. Python笔记12-----画图Matplotlib
  2. Linux Shell脚本编程-语句控制
  3. react 简单在页面中输出一段文字
  4. 工具-docker01
  5. HDU——T1231 最大连续子序列
  6. D - Constructing Roads
  7. WebGL 权威资源站小聚
  8. hadoop无法启动DataNode问题
  9. C9---include,编译
  10. iOS判断一些权限是否被禁止