1,emp表
2,dept表
3,job表
4,loc表
创建表 复制oracle自带表
create table emp as select * from hr.employees;
create table dept as select * from hr.departments;
create table job as select * from hr.jobs;
create table loc as select * from hr.locations;
工资 = 薪金 + 佣金
1.列出至少有一个员工的所有部门。
- 这里用的是多行子查询 in
select * from dept
where department_id IN
(SELECT department_id FROM EMP group by department_id);
2,列出薪金比“Alexander”多的所有员工。
select first_name,salary from emp where salary >
(select