网站大量收购闲置独家精品文档,联系QQ:2885784924

数据库系统原理与设计第二版实验教程实验一到实验三.docx

数据库系统原理与设计第二版实验教程实验一到实验三.docx

  1. 1、本文档共14页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据库系统原理与设计第二版实验教程实验一到实验三

实验一1:1.select employeeName,headship,salaryfrom Employee2select CustomerName,addressfrom Customerwhere customerName like %有限%3select * from employee where employeeName like 张%梅 4 SELECT employeeName,department,address,isnull (convert(char(10),birthday,120),不详)出生日期,case sex when Mthen 男 when Fthen女end as 性别from employeewhere (address like %上海%or address like %南昌%)and sex=F5select * from employee where (headship=职员 or headship=科长) and sex=F6Select * from Customer where CustomerNo not in ( ,7update ordermaster set ordersum=sum2 from ordermaster a,(select orderno,sum(quantity*price)sum2 from orderdetail group by orderno)b where a.orderno=b.orderno Select * From ordermaster Where ordersum=50008 SELECT?TOP?10?PERCENT?*??from?orderdetail?order?by?price?DESC实验二1select a.employeeNo, a.employeeName,a.hireDatefrom employee a,Employee bwhere a.employeeNo!=b.employeeNo and a.employeeName!=b.employeeNameand a.hiredate=b.hireDate order by b.employeeName2 select a.employeeName,a.sex,a.department,a.headShipfrom Employee a,Employee b where a.department=b.department and b.employeeName=陈诗杰3.select *from Employee a where a.salary(select avg(b.salary) from Employee b) 4 select a.customerNo,a.customerName,b.orderNo,sum(quantity*price) orderSum from Customer a,OrderMaster b,OrderDetail c where a.customerNo=b.customerNo and b.orderNo=c.orderNo group by a.customerNo,a.customerName,b.orderNo 5 SELECT?a.customerNo,customerName?FROM?Customer?a?WHERE?a.customerNo?NOT?IN?(SELECT?customerNo?FROM?OrderMaster?)6.select employeeName,case sex when M then 男 when F then 女 end as sex, b.orderDate,c.quantity 销售数量,c.quantity*c.price 金额 from Employee a,OrderMaster b,OrderDetail c where a.employeeNo=b.salerNo and b.orderNo=c.orderNo and c.productNo in(select f.productNo from OrderMaster d,OrderDetail e,Product f where d.orderNo=e.orderNo and productName=32M DRAM)7 select orderNo,sum(quantity*price) orderSum from OrderDetail group by orderNo having sum(quantity*price)=(select max(ord

文档评论(0)

文档精品 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:6203200221000001

1亿VIP精品文档

相关文档