两个单引号一般都是出现在动态SQL语句中
在动态SQL语句中两个单引号表示为一个单引号
select * from table1 where col1='张三'
--上面和下面的SQL语句是一样的
declare @strsql nvarchar(4000)
set @strsql='select * from table1 where col1=''张三'''
exec @strsql
--上面的SQL语句和下面的动态SQL语句执行结果是一样的
转载于:https://blog.51cto.com/1926500/2337997