User Tools

Site Tools


kurs:delete_truncate_drop

This is an old revision of the document!


select * from emp_copy;

delete from emp_copy where employee_id in (SELECT EMP_COPY.EMPLOYEE_ID 
FROM EMP_COPY , DEPARTMENTS 
WHERE ( (EMP_COPY.DEPARTMENT_ID = DEPARTMENTS.DEPARTMENT_ID) AND
(DEPARTMENTS.DEPARTMENT_NAME = 'IT') ))

select * from employees
minus 
select * from emp_copy


create table emp_tmp as select * from emp_copy
drop table emp_tmp;
truncate table emp_copy
select * from emp_copy
insert into emp_copy select * from employees
kurs/delete_truncate_drop.1288356394.txt.gz · Last modified: 2014/09/10 21:22 (external edit)