下载后可任意编辑数据库实验(第三次) 题目 1 实验内容:1
检索上海产的零件的工程名称;2
检索供应工程 J1 零件 P1 的供应商号 SNO;3
检索供应工程 J1 零件为红色的供应商号 SNO;4
检索没有使用天津生产的红色零件的工程号 JNO;5
检索至少用了供应商 S1 所供应的全部零件的工程号 JNO;6
检索购买了零件 P1 的工程项目号 JNO 及数量 QTY,并要求对查询的结果按数下载后可任意编辑量 QTY 降序排列
1select jnamefrom jwhere jno in(select jnofrom spjwhere sno in(select sno from swhere city ='上海'));2select snofrom spjwhere jno ='j1'and pno ='p1'3下载后可任意编辑selectdistinct snofrom spjwhere pno in(select pno from pwhere color='红'and pno in(select pno from spjwhere jno ='j1'));4selectdistinct jno from spjwhere pno notin(select pnofrom p where color ='红'and pno in(selectpno from spj where sno in(select sno from swhere city ='天津')))下载后可任意编辑5select jno from spj where sno ='s1'6select jno,qty from