Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE
- n NUMBER;
- BEGIN
- n := 0;
- FOR i IN
- (
- SELECT s.*
- FROM sourse_table s
- WHERE NOT existx (SELECT 1 FROM destination_table d WHERE d.column_key = s.column_key )
- )
- LOOP
- n:= n+1;
- INSERT INTO destination_table d VALUES (s....);
- IF n>=100 THEN
- COMMIT;
- DBMS_OUTPUT.put_line('...');
- n := 0;
- END IF;
- END LOOP;
- COMMIT;
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement