select emp_no
from employees
where emp_no not in (select emp_no from dept_manager);
获取薪水第二多的员工的emp_no以及其对应的薪水salary
select emp_no,salary
from salaries
where
salary =
(select distinct salary
from salaries
order by salary desc
limit 1,1)
limit1,1表示从第二条开始查,并且查一条
将employees表的所有员工的last_name和first_name拼接起来作为Name,中间以一个空格区分。
select concat(last_name,' ',first_name)
from employees
插入数据
在这里插入代码片