文档介绍:一、实验名称:
子查询以及管理数据库和表
二、日 期
三、实验目的和内容(这是实验报告极其重要的内容。)
带IN字句的子查询;
带EXIST的子查询;
嵌套子查询;
ALL 和 ANY 关键字被用于在子查询中修改己有的比较操作符;
集合函数也被用于在子查询中以产生来自内部查询的集合值;
相关子查询
嵌套查询
管理数据库和表
数据完整性实施
四、实验过程及结果
(给出实验主要的步骤和实验结果,包括算法或代码)
1. select salesorderID from
where totaldue>(selectavg(totaldue)from )
2. select salesorderID from
where linetotal>(selectmax(linetotal)from where salesorderID='43662')
3. select , from a join b on =
whereyear(duedate)='2001'
4. select ,
,,
sss. LastName from s join ss on =
join
person .contact sss on = where ='catherine'and sss. LastName='abel'
salesorderdetailid from where specialofferid in
(select specialofferid from where discountpct='0')
6. select salesorderid,salesorderdetailid,linetotal from where linetotal>
(selectavg(linetotal)from )
salesorderid from where creditcardid in
(select creditcardid from where cardtype='sup