数据库系统概论实验报告(全) 下载本文

3、找出使用上海产的零件的工程名称

Select jname from J

where jno in (select jno from S,SPJ

where S.SNO =SPJ .SNO and s.city='上海'

group by jno)

4、找出没有使用天津产的零件的工程号码

select jno from SPJ

where jno not in(select jno from S,SPJ

where S.SNO =SPJ .SNO and s.city='天津' group by jno) group by jno

四、 主要仪器设备及耗材

PC机一台

五、 参考资料

卫琳 《SQL SERVER 2008数据库应用与开发教程》清华大学出版社 2011.6

一、 实验项目名称

南昌大学实验报告三

增加、删除、修改数据库记录

二、 实验目的

熟悉数据库增、删、改操作

三、 实验基本原理和内容 1、把全部红色零件的颜色改为蓝色

update P set color='蓝' Where color='红'

2、由S5供应的J4的零件改为由S3供应,请作必要的修改

update SPJ Set sno='S3'

where sno in(select sno from SPJ

where pno in (select pno from SPJ

Where sno='s5' and jno='j4') group by sno)

3、从供应商关系中删除S2的记录,并从供应商关系中删除相应的记录

delete from s

where sno='s2' delete from SPJ

where SNO='s2'

\\

4、请将(S2,J6,P4,200)插入供应情况关系 insert

into spj(sno,pno,jno,qty) values('S2','J6','P4',200)