select case when col <=0 then 0 else col end
Select
CASE WHEN sex = '1' THEN '男'
WHEN sex = '2' THEN '女'
ELSE '其他' END
From tb_user;
版权声明:本文为kaige8312原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
select case when col <=0 then 0 else col end
Select
CASE WHEN sex = '1' THEN '男'
WHEN sex = '2' THEN '女'
ELSE '其他' END
From tb_user;