1 / 10
文档名称:

数据库答案 第三章习题参考答案ppt课件.ppt

格式:ppt   大小:55KB   页数:10页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

数据库答案 第三章习题参考答案ppt课件.ppt

上传人:相惜 2021/4/10 文件大小:55 KB

下载得到文件列表

数据库答案 第三章习题参考答案ppt课件.ppt

文档介绍

文档介绍:
Select sno from spj
Where jno=‘J1’;

Select sno from spj
Where jno=‘J1’ and pno=‘P1’;<br****题三 第4题
1

Select sno from spj, p
Where = and jno=‘J1’ and color=‘红’;
或:
Select sno from spj
Where jno =‘J1’ and pno in
(Select pno from p
where color=‘红’ );
2

Select jno
From j
Where not exists
(Select *
From spj, s, p
where = and =
and = and =‘天津’
and =‘红’ );
3

即查找:不存在这样的零件y,供应商S1供应了y,而工程x为选用y。
Select distinct jno
From spj z
Where not exists
(select *
from spj x
where sno=‘S1’
and not exists
(select *
from spj y
where = and =));
4<br****题三 第5题
1. 找出所有供应商的姓名及其所在城市。
Select sname, city
from s;
2. 找出所有零件的名称、颜色、重量。
Select pname, color, weight
from p;

Select jno
from spj
where sno=‘S1’;
5
所使用的各种零件的名称及其数量。
Select ,
from p, spj
where = and =‘J2’;

Select distinct pno
from spj
where sno in
(Select sno
from s
where city=‘上海’);
6
6. 找出使用上海产的零件的工程项目名。
Select jname
from j,spj,s
where =