(附答案)数据库期中考试复习题目汇总.doc_第1页
(附答案)数据库期中考试复习题目汇总.doc_第2页
(附答案)数据库期中考试复习题目汇总.doc_第3页
(附答案)数据库期中考试复习题目汇总.doc_第4页
(附答案)数据库期中考试复习题目汇总.doc_第5页
免费预览已结束,剩余16页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

数据库概论课程期中复习题目汇总一、为某百货公司设计一个E-R模型。 百货管辖若干个连锁商店,每家商店经营若干商品,每家商店有若干职工,但每个职工只能服务于一家商店。实体类型“商店”的属性有:商店编号,店号,店址,店经理。实体类型“商品”的属性有:商品编号,商品名,单价,产地。实体类型“职工”的属性有:职工编号,职工名,性别,工资。在联系中应反映出职工参加某商店工作的开始时间,商店销售商品的有销售量。 试画出反映商店、商品、职工实体类型及联系类型的ER图,并将其转换成关系模式集。二、关系代数设有三个关系:S(S#,SNAME,AGE,SEX)SC(S#,C#,GRADE)C(C#,CNAME,TEACHER)说明:S#学号 SNAME学生姓名 AGE年龄 SEX性别C#课程号 CNAME课程名 TEACHER教师 GRADE成绩试用关系代数写出查询语句。(1)检索LIU老师所授课程的课程号、课程名。(2)检索年龄大于23岁的男学生的学号与姓名。(3)检索学号为S3学生所学课程的课程名与任课教师名。(4)检索至少选修LIU老师所授课程中一门课程的女学生的姓名。(5)检索WANG同学不学的课程号。(6)检索至少选修两门课程的学生学号。(7)检索全部学生都选修的课程的课程号与学生学号。(8)检索选修课程包含LIU老师所授课程的学生学号。(用代表自然连接):(1)C#,CNAME(TEACHER=LIU(C)(2)S#,SNAME(AGE23SEX=男(S)(3)CNAME,TEACHER(S#=S3(SCC)(4)SNAME(SEX=女TEACHER=LIU(SSCC)(5)C#(C)-C#(SNAME=WANG(SSC)(6)S#(1=425(SCSC) (SC自乘之后,同一个学号下两个课程号不同的元组)(7)C#,S#(SC(S#,C#(SC)S#(S)(8)S#(TEACHER=LIU(SSCC)三、SQL语句(1)1、建立一个数据库和五张表的表结构。(1)/*员工人事表employee */emp_nochar(5)Not nullprimary key员工编号emp_namechar(10)Not null员工姓名sexchar(1)Not null性别deptchar(4)Not null所属部门titlechar(6)Not null职称date_hireddatetimeNot null到职日birthdaydatetimeNull生日salaryintNot null薪水addrchar(50)null住址Mod_datedatetimeDefault(getdate()操作者(2)/*客户表customer */cust_idchar(5)Not nullprimary key客户号cust_namechar(20)Not null,客户名称addrchar(40)Not null,客户住址tel_nochar(10)Not null,客户电话zipchar(6)null邮政编码(3)/*销售主表sales */order_nointNot nullprimary key订单编号cust_idchar(5)Not null,客户号sale_idchar(5)Not null,业务员编号tot_amtnumeric(9,2)Not null,订单金额order_datedatetimeNot null,订货日期ship_datedatetimeNot null,出货日期invoice_nochar(10)Not null发票号码(4)/*销货明细表sale_item */order_nointNot null,primary key订单编号prod_idchar(5)Not null,产品编号qtyintNot null销售数量unit_pricenumeric(7,2)Not null单价order_datedatetimenull订单日期(5)/*产品名称表product */prod_idchar(5)Not nullprimary key产品编号prod_namechar(20)Not null产品名称4、通过T-SQL语句修改表约束。1)分别为每张表建立主键约束。2)为相关表建立外键约束。3)在表employee加入CHECK约束:输入的员工编号必须以E开头的5位数编号,性别只能为M/F。4)为销售主表sales中的发票编号字段建立UNIQUE约束。5)创建一个视图,该视图只含上海客户信息,即客户号、客户姓名、住址6)对视图添加一条记录数据(注意:分别查看customer表和该视图的结果)7)删除视图中所有姓“王”的客户数据8)通过视图修改表内某一客户的姓名9)有两个基本表employee和sales,创建一个视图,该视图包含相同业务员的编号、姓名、订单号、销售总金额10)将上述视图中订单号为10001的记录的销售总金额改为6000011)给上述视图添加一条记录数据12)删除上述视图(1)建立数据库jianghong create database jianghongon (name=jianghong, filename=E:数据库jianghong.mdf, size=3, maxsize=10, filegrowth= 1 )log on (name=jianghonglog, filename=E:数据库jianghonglog.ldf, size=1, maxsize=5, filegrowth=1)go(2)建立数据表创建employee表: create table employee(emp_no char(5) not null primary key, emp_name char(10) not null, sex char(1) not null, dept char(4) not null, title char(6) not null,data_hired datetime not null,birthday datetime null,salary int not null,addr char(50) null,Mod_date datetime Default(getdate(),)创建customer表:create table customer(cust_id char(5) not null primary key, cust_name char(20) not null, addr char(40) not null, tel_no char(10) not null, zip char(6) null,)创建sales表:create table sales(order_no int not null primary key, cust_id char(5) not null, sale_id char(5) not null, tot_amt numeric(9,2) not null,order_date datetime not null, ship_date datetime not null, invoice_no char(10) not null,)创建sale_item表:create table sale_item(order_no int not null , prod_id char(5) not null , qty int not null, unit_price numeric(7,2) not null, order_date datetime null,primary key (order_no,prod_id),)创建product表:create table product(prod_id char(5) not null primary key, prod_name char(20) not null,)(3)为相关表建立外键约束 alter table sales add foreign key (cust_id) references customer(cust_id); alter table sale_item add foreign key (order_no) references sales(order_no); alter table sale_item add foreign key (prod_id) references product(prod_id);(4)为表employee加入check约束:alter table employee add constraint c1 check(emp_no like E_ and (sex=M or sex=f);(5)为表sales发票号建立unique约束:alter table sales add unique(invoice_no);(6)创建一个视图,该视图只含上海客户信息,即客户号、客户姓名、住址:create view sh_kehuas select cust_id,cust_name,addrfrom customerwhere addr like 上海2(7)删除视图中所有姓“王”的客户数据:DELETE FROM sh_kehuWHERE cust_name LIKE 王%(8)通过视图修改表内某一客户的姓名update sh_kehuset cust_name=江洪好where cust_id=4224(9)有两个基本表employee和sales,创建一个视图,该视图包含相同业务员的编号、姓名、订单号、销售总金额:create view em_saasselect sale_id,emp_name,order_no,tot_amtfrom employee,saleswhere employee.emp_no=sales.sale_id(10)将上述视图中订单号为10001的记录的销售总金额改为60000:update em_saset tot_amt=60000where order_no=10001(11)删除上述视图:drop view em_sadrop view sh_kehu5、使用SQL语句实现下述查询操作。1)查找表中所有姓刘的职工的工号,部门,薪水2)查找所有定单金额高于20000的所有客户编号3)查找出职称为经理和职称为职员的女员工的姓名、职称、性别。4)选取销售数量最多的前5条订单订单号、数量。5)按部门进行汇总,统计每个部门的总工资6)由employee表中查找出薪水最高的员工信息。7)由sales表中查找出订单金额大于“E0013业务员在1996/10/15这天所接每一张订单的金额”的所有订单。8)检索product 表和sale_item表中数量大于2的相同产品的产品编号、产品名称、数量、单价。9)查找出employee表中住址相同的员工的姓名、性别、职称、薪水、住址。10)查找所有经理的姓名、职称、薪水。11)查找出姓“王”并且姓名的最后一个字为“功”的员工。12)查找住在上海或北京的女员工,并显示其姓名、所属部门、职称、住址。13)在表sales中挑出销售金额大于等于10000元订单。14)选取订单金额最高的前10%的订单数据。15)查找出职称为经理或职称为职员的女员工的信息。16)删除sales表中作废的订单(其发票号码为I000000004)。17)计算出一共销售了几种产品。18)显示sale_item表中每种个别产品的订购金额总和,并且依据销售金额由大到小排列来显示出每一种产品的排行榜。19)计算每一产品每月的销售金额总和,并将结果按销售(月份,产品编号)排序。20)由sales表中查找出销售金额最高的订单。21)由sales表中查找出订单金额大于“E0013业务员在1996/10/15这天所接任一张订单的金额”的所有订单,并显示承接这些订单的业务员和该条订单的金额。22)找出公司女业务员所接的订单。23)找出公司中姓名相同的员工,并且依据员工编号排序相识这些员工信息。24)找出目前业绩未超过200000元的员工。25)计算公司内各个部门的工资支出总和。26)计算每一产品销售数量总和与平均销售单价。27)查找出employee表中部门相同且住址相同的女员工的姓名、性别、职称、薪水、住址。28)检索product 表和sale_item表中相同产品的产品编号、产品名称、数量、单价。29)检索product 表和sale_item表中单价高于2400元的相同产品的产品编号、产品名称、数量、单价。30)查找员工的编号、姓名、部门和出生日期,如果出生日期为空值,-显示日期不详,并按部门排序输出,日期格式为yyyy-mm-dd。31)查找与喻自强在同一个单位的员工姓名、性别、部门和职称32)查找商品名称为14寸显示器商品的销售情况,-显示该商品的编号、销售数量、单价和金额33)在销售明细表中按产品编号进行汇总,统计每种产品的销售数量和金额34)按客户编号统计每个客户1996年的订单总金额35)查找有销售记录的客户编号、名称和订单总额36)查找在1997年中有销售记录的客户编号、名称和订单总额37)查找一次销售最大的销售记录38)查找至少有3次销售的业务员名单和销售日期39)用存在量词查找没有订货记录的客户名称40)使用左外连接查找每个客户的客户编号、名称、订货日期、订单金额-订货日期不要显示时间,日期格式为yyyy-mm-dd-按客户编号排序,同一客户再按订单降序排序输出41)查找16MDRAM的销售情况,要求显示相应的销售员的姓名、-性别,销售日期、销售数量和金额,其中性别用男、女表示42)查找每个人的销售记录,要求显示销售员的编号、姓名、性别、-产品名称、数量、单价、金额和销售日期43)查找销售金额最大的客户名称和总货款44)查找销售总额少于1000元的销售员编号、姓名和销售额45)查找至少销售了3种商品的客户编号、客户名称、商品编号、商品名称、数量和金额46)查找至少与世界技术开发公司销售相同的客户编号、名称和商品编号、商品名称、数量和金额47)统计表中员工的薪水在40000-60000之间的人数48)查询表中的同一部门的职工的平均工资,但只查询住址是上海市的员工49)将表中住址为上海市的员工住址改为北京市50)查找业务部或会计部的女员工的基本信息。51)显示每种产品的销售金额总和,并依销售金额由大到小输出。52)选取编号界于C0001和C0004的客户编号、客户名称、客户地址。53)将业务部员工的薪水上调3%。54)由employee表中查找出薪水最低的员工信息。55)使用join查询客户姓名为客户丙所购货物的客户名称,定单金额,定货日期,电话号码56)计算P0001产品的平均销售单价57)找出公司女员工所接的定单58)找出同一天进入公司服务的员工59)找出目前业绩超过232000元的员工编号和姓名。60)查询出employee表中所有女职工的平均工资和住址在上海市的所有女职工的平均工资61)在employee表中查询薪水超过员工平均薪水的员工信息。62)找出目前销售业绩超过40000元的业务员编号及销售业绩,并按销售业绩从大到小排序。63)找出公司男业务员所接且订单金额超过2000元的订单号及订单金额。64)查询sales表中订单金额最高的订单号及订单金额。65)查询在每张订单中订购金额超过24000元的客户名及其地址。66)求出每位客户的总订购金额,显示出客户号及总订购金额,并按总订购金额降序排列。67)求每位客户订购的每种产品的总数量及平均单价,并按客户号,产品号从小到大排列。68)查询订购了三种以上产品的订单号。69)查询订购的产品至少包含了订单10003中所订购产品的订单。70)在sales表中查找出订单金额大于“E0013业务员在1996/11/10这天所接每一张订单的金额”的所有订单,并显示承接这些订单的业务员和该订单的金额。71)查询末承接业务的员工的信息。72)查询来自上海市的客户的姓名,电话、订单号及订单金额。73)查询每位业务员各个月的业绩,并按业务员编号、月份降序排序。74)求每种产品的总销售数量及总销售金额,要求显示出产品编号、产品名称,总数量及总金额,并按产品号从小到大排列。75)查询总订购金额超过C0002客户的总订购金额的客户号,客户名及其住址。76)查询业绩最好的的业务员号、业务员名及其总销售金额。77)查询每位客户所订购的每种产品的详细清单,要求显示出客户号,客户名,产品号,产品名,数量及单价。78)求各部门的平均薪水,要求按平均薪水从小到大排序。1、查找表中所有姓刘的职工的工号,部门,薪水selectemp_no,emp_name,dept,salaryfromemployeewhereemp_name like 刘%2、查找所有定单金额高于20000的所有客户编号selectcust_idfrom saleswheretot_amt200003、查找出职称为经理和职称为职员的女员工的姓名、职称、性别。selectemp_name,title,sexfromemployeewheretitle=经理ortitle=职员and sex=F4、选取销售数量最多的前5条订单订单号、数量。select top5 with tiesorder_no,sup_id,qtyfromsale_itemorder byqty desc5、按部门进行汇总,统计每个部门的总工资selectdept,sum(salary)fromemployeegroup bydept6、由employee表中查找出薪水最高的员工信息。select *fromemployeewheresalary=(selectmax(salary )fromemployee )7、由sales表中查找出订单金额大于“E0013业务员在1996/10/15这天所接每一张订单的金额”的所有订单。select *from saleswheretot_amtall(selecttot_amtfromsaleswheresale_id=E0013andorder_date=1996/10/15)order bytot_amt8、 检索product表和sale_item表中数量大于2的相同产品的产品编号、产品名称、数量、单价。d_id,a.qty,a.unit_price,d_namefromsale_item as a innerjoin product as b /*如果改成leftjoin/rightjoin 试分析结果*/on (d_id=_id)anda.qty2order d_id9、查找出employee表中住址相同的员工的姓名、性别、职称、薪水、住址。selecta.emp_name,a.sex,a.title,a.salary,a.addr,b.emp_name,b.sex,b.title,b.salary,b.addrfromemployee as a innerjoin employee as bon(a.emp_no!=b.emp_no) and(a.emp_nameb.emp_name) and (a.addr=b.addr)10、查找所有经理的姓名、职称、薪水。selectemp_name,title,salaryfromemployeewheretitle=经理11、查找出姓“王”并且姓名的最后一个字为“功”的员工。select*fromemployeewhereemp_namelike 王%功12、查找住在上海或北京的女员工,并显示其姓名、所属部门、职称、住址。selectemp_name,dept title,addrfromemployeewheresex=Fand (addr like 北京% or addr like 上海%) 13、在表sales中挑出销售金额大于等于10000元订单。select*from saleswheretot_amt=10000 14、选取订单金额最高的前10%的订单数据。selecttop10 percent *fromsalesorderbytot_amt desc15、查找出职称为经理或职称为职员的女员工的信息。select*from employeewheresex=Fand ( title=经理 or title=职员)16、删除sales表中作废的订单(其发票号码为I000000004)。deletefromsale_itemwhereorder_noin(select order_nofrom saleswhereinvoice_no=I000000004) 17、计算出一共销售了几种产品。selectcount(distinctprod_id)fromsale_item 18、显示sale_item表中每种产品的订购金额总和,并且依据销售金额由大到小排列来显示出每一种产品的排行榜。selectprod_id,sum(unit_price*qty)fromsale_itemgroupbyprod_idorderbysum(unit_price*qty) desc 19、计算每一产品每月的销售金额总和,并将结果按销售(月份,产品编号)排序。selectprod_id,month(order_date),sum(unit_price*qty)fromsale_itemgroupbyprod_id,month(order_date)orderbyprod_id,month(order_date) selectprod_id,month(order_date),sum(unit_price*qty)fromsale_itemgroupby prod_id,month(order_date)orderby month(order_date),prod_id 20、由sales表中查找出销售金额最高的订单。select*fromsaleswheretot_amt=(select max(tot_amt)from sales) 21、由sales表中查找出订单金额大于“E0013业务员在1996/10/15这天所接任一张订单的金额”的所有订单,并显示承接这些订单的业务员和该条订单的金额。selectsale_id,tot_amtfromsaleswheretot_amt all(select tot_amtfrom saleswhere sale_id=E0013 and order_date=1996-10-15)22、找出公司女业务员所接的订单。select*fromsaleswheresale_idin(select emp_nofrom employeewhere sex=f) 23、找出公司中姓名相同的员工,并且依据员工编号排序相识这些员工信息。select*fromemployeeawhereexists(select emp_namefrom employee bwhere a.emp_name=b.emp_name and a.emp_no b.emp_no)orderbyemp_name 24、找出目前业绩未超过2000元的员工。select*fromemployeewhereemp_noin(select sale_idfrom salesgroup by sale_idhaving sum(tot_amt)2000) 25、计算公司内各个部门的工资支出总和。selectdept,sum(salary)fromemployeegroupbydept 26、计算每一产品销售数量总和与平均销售单价。selectprod_id,sum(unit_price*qty),avg(unit_price*qty)fromsale_itemgroupbyprod_id 27、查找出employee表中部门相同且住址相同的女员工的姓名、性别、职称、薪水、住址。Selecta.emp_name,a.sex,a.title,a.salary,a.addrfromemployeeas a inner join employee as bon(a.dept=b.dept)and(a.addr=b.addr)wherea.sex=Fandb.sex=F and a.emp_nob.emp_noSelecta.emp_name,a.sex,a.title,a.salary,a.addrfromemployee a , employee bwhere(a.dept=b.dept) and (a.addr=b.addr)anda.sex=Fand b.sex=F anda.emp_nob.emp_no28、检索product 表和sale_item表中相同产品的产品编号、产品名称、数量、单价。d_id,d_name,a.qty,a.unit_pricefromsale_itema, product d_id=d_id/*将连接设为右连接*/d_id,d_name,a.qty,a.unit_pricefromsale_itema, product d_id=* d_d_id,d_name,a.qty,a.unit_pricefromsale_itemas a right outer join product as bon(d_id=d_id) 29、检索product 表和sale_item表中单价高于2400元的相同产品的产品编号、产品名称、数量、单价。d_id,d_name,qty,unit_pricefromproduct,sale_itemwhere unit_price2400 d_id=sale_d_idorderbysale_d_id30、查找员工的编号、姓名、部门和出生日期,如果出生日期为空值,-显示日期不详,并按部门排序输出,日期格式为yyyy-mm-dd。selectemp_no ,emp_name ,dept ,isnull(convert(char(10),birthday,120),日期不详) birthdayfromemployeeorderby dept31、查找与喻自强在同一个单位的员工姓名、性别、部门和职称selectemp_no,emp_name,dept,titlefromemployeewhereemp_name喻自强 and dept in(selectdept from employeewhereemp_name=喻自强)32、按部门进行汇总,统计每个部门的总工资selectdept,sum(salary)fromemployeegroupby dept33、查找商品名称为14寸显示器商品的销售情况,-显示该商品的编号、销售数量、单价和金额d_id,qty,unit_price,unit_price*qty totpricefromsale_item a,product d_id=d_id and prod_name=14寸显示器34、在销售明细表中按产品编号进行汇总,统计每种产品的销售数量和金额selectprod_id,sum(qty) totqty,sum(qty*unit_price) totpricefrom sale_itemgroup byprod_id35、使用convert函数按客户编号统计每个客户1996年的订单总金额selectcust_id,sum(tot_amt) totpricefrom saleswhereconvert(char(4),order_date,120)=1996group bycust_id36、查找有销售记录的客户编号、名称和订单总额selecta.cust_id,cust_name,sum(tot_amt) totpricefrom customera,sales bwherea.cust_id=b.cust_idgroup bya.cust_id,cust_name37、查找在1997年中有销售记录的客户编号、名称和订单总额selecta.cust_id,cust_name,sum(tot_amt) totpricefrom customera,sales bwherea.cust_id=b.cust_id and convert(char(4),order_date,120)=1997group bya.cust_id,cust_name38、查找一次销售最大的销售记录selectorder_no,cust_id,sale_id,tot_amtfrom saleswhere tot_amt=(selectmax(tot_amt)from sales)39、查找至少有3次销售的业务员名单和销售日期select emp_name,order_datefrom employee a,sales b where emp_no=sale_id and a.emp_no in(select sale_idfrom salesgroup by sale_idhaving count(*)=3)order by emp_name40、用存在量词查找没有订货记录的客户名称select cust_namefrom customer awhere not exists(select *from sales bwhere a.cust_id=b.cust_id)41、使用左外连接查找每个客户的客户编号、名称、订货日期、订单金额-订货日期不要显示时间,日期格式为yyyy-mm-dd-按客户编号排序,同一客户再按订单降序排序输出selecta.cust_id,cust_name,convert(char(10),order_date,120),tot_amtfrom customer a left outer join sales b ona.cust_id=b.cust_idorder by a.cust_id,tot_amt desc42、查找16MDRAM的销售情况,要求显示相应的销售员的姓名、-性别,销售日期、销售数量和金额,其中性别用男、女表示select emp_name 姓名,性别=case a.sex when m then 男when f then 女else 未end,销售日期=isnull(convert(char(10),c.order_date,120),日期不详),qty 数量, qty*unit_price as金额from employee a, sales b, sale_item c,product dwhere d_name=16M DRAM _id=d_id andemp_no=b.sale_id and b.order_no=c.order_no43、查找每个人的销售记录,要求显示销售员的编号、姓名、性别、-产品名称、数量、单价、金额和销售日期select emp_no 编号,emp_name姓名, 性别=case a.sex when m then 男when f then 女else 未end,prod_name 产品名称,销售日期=isnull(convert(char(10),c.order_date,120),日期不详),qty 数量, qty*unit_price as金额from employee a left outer join sales b ona.emp_no=b.sale_id , sale_item c,product dwhere _id=d_id andb.order_no=c.order_no44、查找销售金额最大的客户名称和总货款select cust_name,d.cust_sumfrom customer a,(select cust_id,cust_sumfrom (select cust_id, sum(tot_amt) as cust_sumfrom salesgroup by cust_id ) bwhere b.cust_sum = ( select max(cust_sum)from (select cust_id, sum(tot_amt) as cust_sumfrom salesgroup by cust_id ) c ) dwhere a.cust_id=d.cust_id45、查找销售总额少于1000元的销售员编号、姓名和销售额select emp_no,emp_name,d.sale_sumfrom employee a,(select sale_id,sale_sumfrom (select sale_id, sum(tot_amt) as sale_sumfrom salesgroup by sale_id ) bwhere b.sale_sum =3) h )47、查找至少与世界技术开发公司销售相同的客户编号、名称和商品编号、商品名称、数量和金额selecta.cust_id,cust_name,d_id,prod_name,qty,qty*unit_pricefrom customer a, product b, sales c, sale_item dwhere a.cust_id=c.cust_id and d_id=d_idandc.order_no=d.order_no and not exists(select f.*from customer x ,sales e, sale_item fwhere cust_name=世界技术开发公司 andx.cust_id=e.cust_id andorder_no=f.order_no and not exists( select g.*from sale_item g, sales hwhere d_id = d_id andg.order_no=h.order_no andh.cust_id=a.cust_id)48、查找表中所有姓刘的职工的工号,部门,薪水select emp_no,emp_name,dept,salaryfrom employeewhere emp_name like 刘%49、查找所有定单金额高于20000的所有客户编号select cust_idfrom saleswhere tot_amt2000050、统计表中员工的薪水在40000-60000之间的人数select count(*)as 人数from employeewhere salary between 40000 and 6000051、查询表中的同一部门的职工的平均工资,但只查询住址是上海市的员工select avg(salary) avg_sal,deptfrom employee where addr like 上海市%group by dept52、将表中住址为上海市的员工住址改为北京市update employee set addr like 北京市where addr like 上海市53、查找业务部或会计部的女员工的基本信息。select emp_no,emp_name,deptfrom employee where sex=Fand dept in (业务,会计)54、显示每种产品的销售金额总和,并依销售金额由大到小输出。select prod_id ,sum(qty*unit_price)from sale_item group by prod_idorder by sum(qty*unit_price) desc55、选取编号界于C0001和C0004的客户编号、客户名称、客户地址。select CUST_ID,cust_name,addrfrom customer where cust_id between C0001 AND C000456、计算出一共销售了几种产品。select count(distinct prod_id) as 共销售产品数from sale_item 57、将业务部员工的薪水上调3%。update employeeset salary=salary*1.03where dept=业务58、由employee表中查找出薪水最低的员工信息。select *from employeewhere salary=(select min(salary )from employee )59、使用join查询客户姓名为客户丙所购货物的客户名称,定单金额,定货日期,电话号码select a.cust_id,b.tot_a

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论