ImageVerifierCode 换一换
格式:DOCX , 页数:15 ,大小:246.24KB ,
资源ID:17213311      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/17213311.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(数据库1数据查询Word下载.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

数据库1数据查询Word下载.docx

1、order by ASC|DESC;实验方法:将查询需求用T-SQL语言表示;在SQL Server Query Analyzer的输入区中输入T-SQL查询语句;设置 Query Analyzer的结果区为Standard Execute(标准执行)或Execute to Grid(网格执行)方式;发布执行命令,并在结果区中查看查询结果;如果结果不正确,要进行修改,直到正确为止。实验内容:1. 分别用带DISTINCT和不带DISTINCT关键字的SELELCT在student中进行查询.带distinct:Select class_id from student不带distinct:sel

2、ect distinct class_id 2. 将teacher表中各教师的姓名、教工号及工资按95发放的信息,并将工资按95发放后的列名改为预发工资select teacher_id,teacher_name,salary*0.95 as 预发工资from teacher3. 查询course表中所有学分大于2并且成绩不及格的学生的信息.select distinct student.* from student,course,sc where student.student_id=sc.student_id and sc.course_id=course.course_id and co

3、urse.credit2 and sc.grade80In: from student where student_id in( select student_id from sc where course_id= and grade80)exists: where exists( and course_id=10. 查询所有上计算机基础课程的学生的学号、选修课程号以及分数(分别用连接,in和exists实现)select sc.* where course.course_name=计算机基础 and course.course_id=sc.course_idselect student_id

4、,course_id,grade from sc where course_id select course_id from course where course_name=) select * where course_id=sc.course_id and course_name=11. 查询选修了课程名为“数据库基础”的学生学号和姓名(分别用连接,in和exists实现)select student.student_id,student.student_name from sc,student,course 数据库开发技术 and sc.student_id=student.stude

5、nt_id select student_id,student_name from student where student_id in( where course_id=( ) ) and sc.course_id=( )12. 查询所有计算机系学生的学号、选修课程号以及分数(分别用连接,in和exists实现) from sc,department,student where department.department_name=计算机科学 and department.department_id=student.department_id and sc.student_id=stude

6、nt.student_idselect* where department_id=( select department_id from department where department_name=) where exists ( select * from student where student.student_id =sc.student_id and student.department_id=(计算机科13查询每个dep_04系学生的总成绩、平均成绩, 仅显示平均成绩及格的学生的记录。select student.student_name ,sum(grade) as 总成绩

7、,avg(grade) as 平均成绩 from sc, student,department and student.department_id=department.Department_id and department.department_id=dep_04 group by student.student_id,student_name having avg(grade)14查询“数据库开发技术”的平均成绩select avg(grade) as 数据库开发平均成绩 where course_id in(15按职称查询教师的平均工资,并按总工资降序排列select professi

8、on,avg(salary) as 平均工资,sum(salary) as 总工资 group by profession order by sum(salary) desc附录1:教务管理数据库jwgl结构student表结构列名称数据类型长度允许空值说明Student_idChar8否学生学号Student_nameVarchar学生姓名SexBit1性别AgeInt4年龄Class_id 6班级号Department_id系编号Addressvarchar50家庭住址Course表字段名称允许空Course_id10课程号Course_name20课程名称Book_id15书标识SC表学

9、生号gradeTinyint成绩credit学分Teacher表Teacher_id9教师编号Teacher_namenvarchar教师姓名所在系号ProfessionNvarchar16职称phone是电话adressNchar40住址SalaryNumeric7.2工资BirthSmalldatetime出生日期Postalcode6,0邮编Book表13书号Book_name30书名Publish_company出版社Author作者Price5.2价格Class表Class_idMonitor班主任姓名Class_course表charDepartment表Department_name系名称

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1