Merge statment in oracle
========================
drop table emp1;
create table emp1 as select * from emp ;
drop table dept1;
create table dept1 as select * from dept;
MERGE INTO emp1 a
USING dept1 b
ON (a.deptno = b.deptno)
WHEN MATCHED THEN
UPDATE SET a.sal = b.deptno
WHEN NOT MATCHED THEN
INSERT (empno, sal)
VALUES (b.deptno,b.deptno);
Windows Recall : How to disable spy mode
5 days ago
No comments:
Post a Comment