sql - insert and update a record using cursor in oracle - Stack Overflow - 0 views
-
insert and update a record using cursor in oracle
-
MERGE INTO studLoad l USING ( SELECT studId, studName FROM student ) s ON (l.studId = s.studId) WHEN MATCHED THEN UPDATE SET l.studName = s.studName WHERE l.studName != s.studName WHEN NOT MATCHED THEN INSERT (l.studID, l.studName) VALUES (s.studId, s.studName)
-
commit