create view studentinfo(Ano,Dno,Sno,Sname,Cls,Ssex,Sumnow) as
(select room.Ano,room.Dno,room.Sno,student.Sname,student.Cls,student.Ssex,count(*)
from student,room
where student.Sno=room.Sno
group by room.Ano,room.Dno,room.Sno,student.Sname,student.Cls,student.Cls,student.Ssex
)
两个表进行连接成视图时使用聚集函数
最新推荐文章于 2022-06-13 09:40:12 发布