|
- SQL> create table retired_employees (
- 2 EMPLOYEE_ID NUMBER(6),
- 3 FIRST_NAME VARCHAR2(20),
- 4 LAST_NAME VARCHAR2(25),
- 5 EMAIL VARCHAR2(25),
- 6 retired_date date,
- 7 job_id VARCHAR2(10),
- 8 SALARY NUMBER(8,2),
- 9 MANAGER_ID NUMBER(6),
- 10 DEPARTMENT_ID NUMBER(4) ) ;
- Table created.
- SQL> insert into retired_employees values(
- 2 304,
- 3 'Alexandera',
- 4 'Runold',
- 5 'ARUNOLD',
- 6 to_date('03-JAN-11','DD-MON-YY'),
- 7 'IT_PROG',
- 8 6000,
- 9 149,
- 10 60) ;
- 1 row created.
复制代码
- select job_id, hire_date , null as "retired_date"
- from employees
- union
- select job_id, null , retired_date
- from retired_employees;
复制代码
|
|