格式:
case
when 条件 then
内容
when 条件 then
内容
else
内容
end
如:
select t.name,
case
when t.fengshu >= 80 then
'pass'
else
'file'
end
,t.fengshu
from t_table_chengji t;
格式:
case
when 条件 then
内容
when 条件 then
内容
else
内容
end
如:
select t.name,
case
when t.fengshu >= 80 then
'pass'
else
'file'
end
,t.fengshu
from t_table_chengji t;