Code
补充:
select a.uid,a.uname,a.status
case when a.status='1' then "在会"
when a.status='0' then "未知"
when a.statsu='-1' then '离开'
end
as 状态
from a
case能放到where后面,也可在select中
补充:
select a.uid,a.uname,a.status
case when a.status='1' then "在会"
when a.status='0' then "未知"
when a.statsu='-1' then '离开'
end
as 状态
from a
case能放到where后面,也可在select中