牛客网 > 在线编程 > 数据库SQL实战
程序员文章站
2022-05-11 08:10:27
...
题目001. 查找最晚入职员工的所有信息
知识点:
limit beginIndex, count,数据库中,index从0开始,第二个参数是count,而不是toIndex!
SELECT *
FROM employees
WHERE hire_date = (
SELECT hire_date
FROM employees
ORDER BY hire_date DESC
LIMIT 0, 1
);
SELECT *
FROM employees
WHERE hire_date = (
SELECT hire_date
FROM employees
ORDER BY hire_date DESC
LIMIT 2, 1
);
SELECT salaries.*, dept_manager.dept_no
FROM salaries, dept_manager
WHERE salaries.emp_no = dept_manager.emp_no
AND salaries.to_date = '9999-01-01'
AND dept_manager.to_date = '9999-01-01';
题目004. 查找所有已经分配部门的员工的last_name和first_name
知识点:
limit beginIndex, count,数据库中,index从0开始,第二个参数是count,而不是toIndex!
上一篇: 媒体查询@media使用方法
下一篇: shopex安装出错!解决思路