[英]Expression Replace in Oracle SQL
I need to perform an UPDATE on the database, but within that update there is a section that has ' ' (single quotes), because of these quotes when running the error script, can anyone help me?我需要对数据库执行更新,但在该更新中有一个部分有 ' '(单引号),因为在运行错误脚本时有这些引号,任何人都可以帮助我吗?
enter image description here在此处输入图像描述
I've been on this stress all afternoon我整个下午都承受着这种压力
You can use 2 single quotes for that:您可以为此使用 2 个单引号:
update galaxy
set sun = replace(sun, 'font ''Arial''', 'font ''Arial'' 12px')
where earth = 148;
see: PL/SQL, how to escape single quote in a string?请参阅: PL/SQL,如何转义字符串中的单引号?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.