ITeye博客

查询有汉字或字母的语句

dyclh · 2013-06-17 22:59 · sql · mysql · 数据库 · Markdown

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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。