The following is some code that will generate some dml via pl/sql. May be useful, although probably not the best way of implementing from a performance issue.
declare
cursor c_users is
select table_name from user_tables where table_name in ('T1','T2','T3');
begin
for a in c_users loop
execute immediate (
'insert into t4 select username from ' ||
a.table_name ||
' where username not in (select username from dba_users)');
commit;
end loop;
end;
/
Showing posts with label dynamic sql. Show all posts
Showing posts with label dynamic sql. Show all posts
Monday, April 16, 2007
Subscribe to:
Posts (Atom)