一个 关于 case when的SQL
时间:2021-07-01 10:21:17
帮助过:24人阅读
=
CASE
WHEN grade IS NULL THEN
’未考’
WHEN grade < 60
THEN
’不及格’
WHEN grade >= 60
AND grade < 70
THEN
’及格’
WHEN grade >= 70
AND grade < 90
THEN
’良好’
WHEN grade >= 90
THEN
’优秀’
END
FROM
stud_grade
一个 关于 case when的SQL
标签:考试 color 情况 sel 查询 考试成绩 style select span