CASE WHEN条件表达式函数

SELECT
STUDENT_NAME,
(CASE WHEN score < 60 THEN '不及格'
WHEN score >= 60 AND score < 80 THEN '及格'
WHEN score >= 80 THEN '优秀'
ELSE '异常' END) AS REMARK
FROM
TABLE

posted @ 2021-12-14 17:27  丶Ronnie  阅读(56)  评论(0)    收藏  举报