Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. declare
  2. type coll is table of varchar2(200);
  3. source_table coll;
  4. target_table coll;
  5. begin
  6. select column_name bulk collect into source_table from all_tab_cols@remdb where table_name='SOURCE_TABLE';
  7. select column_name bulk collect into target_table from all_tab_cols where table_name='TARGET_TABLE';
  8. -- is source_table collection a subset of target_table collection?
  9. if source_table submultiset target_table then
  10. dbms_output.put_line('source table is a subset of target_table.');
  11. -- code for this case
  12. else
  13. dbms_output.put_line('source table is not a subset of target_table.');
  14. -- code here for this case
  15. end if;
  16. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement