oracle - Comparing one table in 2 schemas to find missing columns -
i made researches; didn’t find similar question. if question duplicated please excuse me because didn’t find in researches.
i have 2 schemas, schema1 , schema2, , both of them have same 6 tables.
but not every table have same column in schema.
exp: tab1 has 40 column exists in schema1 tab1 has 38 columns exists in schema 2. there 2 missing columns want add them. there data need insert.
i can insert them manually take me time, isn’t there simple query?
in researched found tools that. thanks
the following show columns in schema1 don't exist in schema2.
select table_name, column_name, data_type, data_length all_tab_columns owner = 'schema1' minus select table_name, column_name, data_type, data_length all_tab_columns owner = 'schema2'
i edited above include alex's suggestions include data type , length in output.
Comments
Post a Comment