在学生成绩库中,定义存储过程proc_grade,要求实现输入学生学号,根据该学生所选课程的平均成绩显示提示信息,即如果平均成绩在60分以上,显示“此学生综合成绩合格!”,否则显示“此学生综合成绩不合格!student表
sid sname score1 score2 score3 score4
1 tom 11 34 88 34
2 jack 56 54 78 98
3 michael 99 37 78 64
4 may 61 67 87 78这题求一条记录的分数的平均数用SQL语不会写???
sid sname score1 score2 score3 score4
1 tom 11 34 88 34
2 jack 56 54 78 98
3 michael 99 37 78 64
4 may 61 67 87 78这题求一条记录的分数的平均数用SQL语不会写???
as
select case when (score1 +score2+score3+score4)/4>60 then '此学生综合成绩合格!'
else '此学生综合成绩不合格!' end from student
where sid=@sidNo
as
select case when (score1 +score2+score3+score4)/4>60 then '此学生综合成绩合格!'
else '此学生综合成绩不合格!' end from student
where sid=@sidNo
as
select case when (score1+score2+score3+score4)>=240 then '此学生综合成绩合格!'
else '此学生综合成绩不合格!' end
from student
where sid=@vsid