sqlserver特殊字符模糊查询

sqlserver特殊字符模糊查询

使用转义符,后面要使用ESCAPE

 

select count(UserID) from WxUsers ----11800875
select count(UserID) from WxUsers where PicUrl like '%\/\/wx.qlogo.cn%' ESCAPE '\' ----75739937
select count(UserID) from WxUsers where PicUrl like '%\/\/thirdwx.qlogo.cn%' ESCAPE '\'  ----1993163
select count(UserID) from WxUsers where PicUrl is null or PicUrl='' ----3184272
select count(UserID) from WxUsers where PicUrl not like '%\/\/wx.qlogo.cn%' ESCAPE '\' 
and PicUrl not like '%\/\/thirdwx.qlogo.cn%' ESCAPE '\' 
and PicUrl<>'' ----5

 

posted on 2022-10-31 17:46  Jankie1122  阅读(135)  评论(0编辑  收藏  举报