SQLServer实验三方案.doc

实验七 (1)创建并运行存储过程student_grade,要求实现如下功能:查询studb数据库中每个学生各门课的成绩,其中包括每个学生的sno、sname、cname和score。 create procedure student_grade as select student.sno,student.sname,course.cname,student_course.score from student join student_course on student.sno=student_course.sno join course on course.cno=student_course.cno 运行结果代码: use Studb go execute student_grade go (2)创建并运行名为proc_exp的存储过程,要求实现如下功能:从student_course表中查询某一学生考试的平均成绩。 create procedure proc_exp @sname varchar(8) as begin select sname,AVG(score) from student join student_course on student.sno=student_course.sno where sname=@sname group

文档评论(0)

1亿VIP精品文档

相关文档