- 57
- 0
- 约1万字
- 约 11页
- 2016-12-28 发布于湖南
- 举报
-------------------------------------------------------------------------------------------------------
(1)用子查询查询员工“张小娟”所做的订单信息。(难易程度:易)
select * from ordermaster
where salerno in
(
select employeeno from employee where employeename=张小娟
)
------------------------------------------------------------------------------------------------
(2)查询没有订购商品的且在北京地区的客户编号,客户名称和邮政编码,并按邮政编码降序排序。(难易程度:易)
select customerno,customername,zip
from customer c
where address=北京市 and not exists
(select * from ordermaster o where c.customerno=o.customerno)
order by zip desc
方法二:
select CustomerNo,Custome
原创力文档

文档评论(0)