帮忙解决两道数据库的题目! 20
展开全部
第一个的写法很多。
全嵌套的写法:
select jname from j where jno in (select jno from spj where sno in (select sno from s where city='上海'))
关联写法:
select j.jname from s,j,spj where s.sno=spj.sno and j.jno=spj.jno and s.city='上海'
第二个最简单的写法就是把所有的工程名减去用了天津生产零件的工程名:
select jname from j
except
select jname from j where jno in (select jno from spj where sno in (select sno from s where city='天津'))
追问
复制粘贴的能不能别来
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询