拼写sql语句随笔

  DECLARE @str NVARCHAR(1000)='SELECT * FROM dbo.V_MicroUserInfo ',@where VARCHAR(1000)=' where  1=1'
DECLARE @Nature VARCHAR(200)='河南|周口'
SET @where+=' And '''+@Nature+''' like ''%''+HuJiString+ ''%'' '
SET @str+=@where;
PRINT @str
EXEC sys.sp_executesql @str SELECT * FROM dbo.V_MicroUserInfo where 1=1 And '河南|周口市' like '%'+HuJiString+ '%' AND CvNumber=797024 DECLARE @Nature VARCHAR(200)='北京|北京,河北|石家庄,山东|济南'
SELECT * FROM dbo.V_MicroUserInfo WHERE @Nature LIKE '%'+HuJiString+'%'
SELECT * FROM dbo.V_MicroUserInfo where 1=1 And '北京|北京,河北|石家庄,山东|济南' like '%'+HuJiString+ '%'

  

上一篇:haproxy笔记之一:Haproxy基本安装配置(反向代理,类似Nginx,可以代理tcp的连接,不只是http)(注意iptables和selinux的问题)


下一篇:最简单的视频编码器:编译(libx264,libx265,libvpx)