.net传参里的like问题
exec sp_executesql N'select * from cir_article where 1=1 and status like @param0', N'@param0 nchar(4000)', @param0 = N'%'
这句什么都查不出
exec sp_executesql N'select * from (select top 20 * from cir_article where 1=1 and title like @param0) as v1 where not exists ( select distinct 1 from (select top 0 articleid from (select top 20 * from cir_article where 1=1 and title like @param0) as v2) as v3 where articleid=v1.articleid)', N'@param0 nvarchar(4000),@param1 nvarchar(4000)', @param0 = N'%', @param1 = N'2'这句就可以,请问为什么,没区别啊