作业帮 > 数学 > 作业

有一张table-t表,里面有三个字段:英语,其中有三条记录分别表示语文70分,数学80分,英语58

来源:学生作业帮 编辑:大师作文网作业帮 分类:数学作业 时间:2024/09/21 22:16:37
有一张table-t表,里面有三个字段:英语,其中有三条记录分别表示语文70分,数学80分,英语58
,请用一条sql语句查询出这三条记录并按以下条件显示出来:
大于或等于80表优秀,大于等于60表及格,小于60表不及格显示格式:
及格 优秀 不及格
有一张table-t表,里面有三个字段:英语,其中有三条记录分别表示语文70分,数学80分,英语58
select case when 语文>=80 then '优秀' when 语文>=60 then '及格' else '不及格' end 语文 ,
case when 数学>=80 then '优秀' when 数学>=60 then '及格' else '不及格' end 数学 ,
case when 英语>=80 then '优秀' when 英语>=60 then '及格' else '不及格' end 英语 from table_t