sql - 用另一个字符串 SQL 替换其中带有单引号的字符串
问题描述
我在一列中有一个值(称为列 c1),如下所示:
'there it is' is what she said
我想将其替换为:
'there it is plus two' is what she said
但过得很艰难。
Using replace(c1
, ''there it is' is what she said'
, ''there it is plus two' is what she said')
给我“那里的语法不正确”。
解决方案
引用'
内部字符串''
:
replace(c1
, '''there it is'' is what she said'
, '''there it is plus two'' is what she said')
推荐阅读
- ios - 如果在 SwiftUI 中更新核心数据关系导致 UI 中的列表部分重新排序,则会出现无效更新错误
- java - 数组中的随机图片
- javascript - 为什么在页面转换时不调用 next-auth jwt 回调?
- python - 无法让索引在熊猫数据框中工作
- serverless - 即使添加了路径环境,Windows 也无法识别无服务器
- react-admin - 如何在 react-admin 中向资源添加更多属性
- php - 按月设置每周限额
- php - 表单 html 和发件人 php
- maven - 通过 Jenkins 从子 pom 中读取 pom 信息
- python - 创建函数 Microsoft SQL Server