查询有汉字或字母的语句

select *  , case
   when status=1 then '临时会员'
    when status=2 then '注册会员'
     when status=0 then '冻结帐户'
   else ''
end

from tb_user
where
isnull(account,'')<>'' and (account  like  '%[吖-座]%' or
 account  like '%[a-z]%' 
 or account like '%-%' or account like '% %'  )   order by status

猜你喜欢

转载自dyclh.iteye.com/blog/1888431