hI ALL,
I have created two tables in scott/tiger database.
table_a: id number, id_1 varchar2(10), id_2 varchar2(3)
table_b: id varchar2(10), id_1 varchar2(10), id_2 number
What I want to do is compare the table_a and table_b and see if the structure is the same. If not I want to identify the column and the data type where it is not the same.
In this cas id in table_a is number and table_b is varchar.
I have written a query something like this:
select table_name, column_name, data_type from dba_tab_columns where table_name = 'table_a'
minus select table_name, column_name, data_type from
where table_name = 'table_b'
This query is not giving me the result I need. Thank you in advance!!
I have created two tables in scott/tiger database.
table_a: id number, id_1 varchar2(10), id_2 varchar2(3)
table_b: id varchar2(10), id_1 varchar2(10), id_2 number
What I want to do is compare the table_a and table_b and see if the structure is the same. If not I want to identify the column and the data type where it is not the same.
In this cas id in table_a is number and table_b is varchar.
I have written a query something like this:
select table_name, column_name, data_type from dba_tab_columns where table_name = 'table_a'
minus select table_name, column_name, data_type from
where table_name = 'table_b'
This query is not giving me the result I need. Thank you in advance!!