利用t-sql语句创建一个查询每个学生的平均成绩视图,包括学生的学生号和姓名

2024-12-03 03:57:06
推荐回答(2个)
回答1:

create view v1 as
select student.sno,sname,avg(score) 平均成绩
from student join sc on student.sno=sc.sno
group by student.sno,sname

回答2:

usedb_tempgocreateviewview_employee1asselecttop2*fromemployee1