sql cash when语句

select case u.sex when 1 then "man" when 2 then "woman" ELSE "unknow" END AS sex from user u

猜你喜欢

转载自beiqi.iteye.com/blog/2165857