【正文】
from stu_info,xk,gcourse where = and = and xsh=’12’ and kscj60 select ,xm,xsm from stu_info,xk,gdept where = and = and kkny=’20011’ group by ,xm,xsm having count(*)=10實驗5 2題參考實驗4答案 select xh,xm,xbm,bh from stu_info where zyh in (select zyh from stu_info where xm=’李明’) order by xh實驗6 reate view num_ban as select count(distinct bh) from stu_info reate view ban as select distinct bh from stu_info Create view is_stu as select xm,xbm,bh from stu_info where xsh=’01’ or xsh=’02’ Create view zhang_stu as select * from stu_info where xsh=’01’ and xm like ‘張%’或 Create view zhang_stu as select * from stu_info,gdept where xsm=’材料科學(xué)與工程’ and xm like ‘張%’ and =Create view 材0168 as select stu_info.*,xk.* from stu_info,xk where bh=’材0168’ and =create view gaoshu _stu as select xm from stu_info,xk,gcourse where = and = and km=’高等數(shù)學(xué)’或 Create view gaoshu _stu as select xm from stu_info where xh in(select xh from xk where kch =(select kch from gcourse where km=’高等數(shù)學(xué)’) )實驗 8 create table s (sno varchar(10) primary key, sname varxhar(20) not null unique, status int default 10,city varchar(20) not null ) create table p (pno int identity (1,1) primary key, pname varxhar(20) , color varchar(10), weight float check ( weight between 10 and 30) )create table ps (sno varchar(10) references s (sno), pno int references p (pno), qty int ,price float, total as qty*price, primary key(sno,pno) ) delete from p where pname=’螺母’ update ps set price=price*2