格式:
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 的用法
猜你喜欢
转载自672627493.iteye.com/blog/2096246
今日推荐
周排行