compare two tables

Sql code posted
created at 19 Jul 12:51, updated at 19 Jul 12:53

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(
select 'IN T1, NOT T2', column_name, data_type, data_length 
from user_tab_columns 
where table_name = 'T1' 
MINUS 
select 'IN T1, NOT T2', column_name, data_type, data_length 
from user_tab_columns 
where table_name = 'T2'
) 
UNION ALL 
(
select 'IN T2, NOT T1', column_name, data_type, data_length 
from user_tab_columns 
where table_name = 'T2' 
MINUS 
select 'IN T2, NOT T1', column_name, data_type, data_length 
from user_tab_columns 
where table_name = 'T1'
)
485 Bytes in 2 ms with coderay