第1个回答 2012-01-10
create schema "sc" authorization xiaozhu /*定义模式 create table sc(sno char(9), cno char(4), g smallint, primary key(sno,cno), /* 主码有两个属性构成 foreign key(sno) references s(sno), /*完整性约束条件,sno为外码,参照表是s foreign key(cno) references c(cno) /*完整性约束条件,cno为外码,参照表是c ); /*别忘了这个括号 2、update sc set g=0.95*g where sno in(select sno from s where dept='ma'); 3、select cno,cname from c where cno in(select cno from sc group by sno having count(*)> 100); 4、grant select on table s to public; grant update on table 2 to u11; 好累啊,这么多,希望对你有用。不过悬赏只有10分,楼主也太小气了吧。一定要采纳哦