课程名称 | MySQL数据库技术 | 实验 成绩 |
| |||||
实验名称 | 实验五:复杂查询 | |||||||
学号 | 辅导老师;陶荣 | 姓名 |
| 班级 |
| 日期 |
| |
实验目的: 1.掌握select语句的基本语法; 2.掌握连接查询和子查询的使用方法; | ||||||||
实验平台: MySQL+SQLyog; | ||||||||
实验内容与步骤: 以下操作均在YGGL数据库中进行。 一、子查询练习: 1. 查找在财务部工作的员工的情况。
2. 使用子查询的方法查找所有收入在2500元以下的员工的情况。
3. 查找研发部年龄不低于市场部所有员工年龄的雇员姓名。
4. 用子查询的方法查找研发部比市场部所有雇员收入都高的雇员的姓名。
5. 查找比广告部所有员工收入都高的员工的姓名。
6. 在order by中使用子查询,查询员工姓名、性别和工龄信息,要求按 实际收入从大到小排列。
二、连接查询练习: 1. 查询每个员工的情况及其薪水的情况。
2. 使用内连接的方法查询名字为“王林”的员工所在的部门。
3. 使用内连接方法查找不在广告部工作的所有员工信息。
4. 使用外连接方法查找所有员工的月收入。
5. 查找广告部收入在2000元以上的雇员姓名及其薪水详情。
6. 查询研发部在1966年以前出生的员工姓名及其薪水情况。
| ||||||||
实验总结(结论或问题分析):
|
mysql 复杂案例 mysql复杂查询教程
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
java密码复杂度实现
java密码复杂度实现
复杂度 Java 正则表达式 -
by mysql 复杂group mysql复杂语句查询
一. 排序查询 关键字: ORDER BY 语法:order by 排序字段 排序规则 排序规则:desc降序 ASC 升序 默认
by mysql 复杂group mysql 数据库 java 字段 -
java 判断是否在某个返回区间
判空灾难NullObject模式.NR Null Object安装方式OptionalKotlin判空灾难 NullPointerException作为搬砖党的一族们,我们对判空一定再熟悉不过了,不要跟我说你很少进行判空,除非你喜欢NullPointerException。不过NullPointerException对于很多猿们来说,也是Exception家族中最亲近的一员了。
java 判断是否在某个返回区间 如何判断inputstream为空 Kotlin Test Java