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
)
两个表进行连接成视图时使用聚集函数
猜你喜欢
转载自blog.csdn.net/jinyuehai/article/details/106744218
今日推荐
周排行