sql如何判断某值并赋给他另外的值
select *,case when xingbie=0 then '女' else '男' end as xingbie from yishibiao
select XingBieHanZi,CASE WHEN(XingBieHanZi='男') THEN 1 WHEN(XingBieHanZi='女') THEN 0 ELSE 3 END Gender, * FROM table
select *,case when xingbie=0 then '女' else '男' end as xingbie from yishibiao
select XingBieHanZi,CASE WHEN(XingBieHanZi='男') THEN 1 WHEN(XingBieHanZi='女') THEN 0 ELSE 3 END Gender, * FROM table