34,588
社区成员
发帖
与我相关
我的任务
分享
select ''''
----
'
SET @SQL='SELECT distinct ID from table_name where table_ID='''+@ID+''''
原语句SELECT distinct ID from table_name where table_ID='001'
动态语句中' 单侧最外层
正常语句中一个'使用''
''' +号内的字符串在单侧正好有一个要转义的'
'''' +号内的字符串只有一个'