MySQL中的条件语句

判断学生表中成绩是否小于60,将小于60的学生成绩列为不及格

学生表(student)

字段:姓名(name),学号(主键)(num),性别(sex),成绩(score)

select *,if(score<60,"不及格","及格")  from student

原文地址:https://www.cnblogs.com/minshia/p/6798351.html