Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare
- type coll is table of varchar2(200);
- source_table coll;
- target_table coll;
- begin
- select column_name bulk collect into source_table from all_tab_cols@remdb where table_name='SOURCE_TABLE';
- select column_name bulk collect into target_table from all_tab_cols where table_name='TARGET_TABLE';
- -- is source_table collection a subset of target_table collection?
- if source_table submultiset target_table then
- dbms_output.put_line('source table is a subset of target_table.');
- -- code for this case
- else
- dbms_output.put_line('source table is not a subset of target_table.');
- -- code here for this case
- end if;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement