1
create table STUDENT
(
Sid int primary key,
Sname varchar(20) not null,
Ssex bit,
Sage int not null check(Sage between 15 and 40),
Sclass varchar
)
2
insert into CLASS values(101 ,'软件','计算机', 1995 )
insert into STUDENT values(8101 ,'张三', 1,18 , 101 )
3
(1)select from STUDENT where Sname like '[李]%' order by Sage
(2)select distinct Cdep from CLASS group by Cdep having count(Cdep)>2
(3)select Dxihao,Ddep from DEPARTMENT, CLASS,STUDENT where Sclass=Cclass and Cdep=Ddep group by Dxihao,Ddep having count()>=2
4
create or replace trigger 触发器的名字 after delete on CLASS for each row declare Ccalss varchar;
begin
delete from STUDENT where Sclass=Ccalss
end;
5
函数我不清楚,希望上面的可以帮到你
字段是我自己起的,很好理解的
以上就是关于急急急!~ 一道数据库的大题 尤其是(第三个问)请求帮助全部的内容,包括:急急急!~ 一道数据库的大题 尤其是(第三个问)请求帮助、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)