MYSQL ifelse语句
时间:2021-07-01 10:21:17
帮助过:244人阅读
"A"
;
IF salary<5000 THEN SET grade ="E"
;
ELSEIF salary<10000 THEN SET grade ="D"
;
ELSEIF salary<15000 THEN SET grade ="C"
;
ELSEIF salary<20000 THEN SET grade ="B"
;
ELSE SET grade="A"
;
END IF;
RETURN grade;
END $$
DELIMITER ;
SELECT pro_salary_grade(16000);
MYSQL ifelse语句
标签:mit oba declare lse rust har int lob UNC