create view IS_student
as
select sno,sname,sage
from student
where sdept='IS'
create view is_student
as
select sno,sname,sage
from student
where sdept='IS'
with check option
create view IS_S1(sno,sname,grade)
as
select student.sno,sname,grade
from student,sc
where sdept='IS' and
student.sno=sc.sno and
sc.cno='1'
create view IS_S2
as
select sno,sname,grade
from IS_S1
where grade>=90
create view BT_S(sno,sname,sbirth)
as
select sno,sname,2014-sage
from student
create view S_G(sno,gavg)
as
select sno,avg(grade)
from sc
group by sno
create view F_Student(F_sno,name,sex,age,dept)
as
select*
from student
where ssex='女'
drop view BT_S
drop view IS_S1
select sno,sage
from IS_Student
where Sage<20
select IS_Student.sno,sname
from IS_Student,sc
where IS_Student.sno=sc.sno and sc.cno='1'
select *
from S_G
where Gavg>=90
grant select
on student
to U1
4.1-4.10 搞不了