Re: Comparing column names in two tables

From: Lee Miller <lpm_at_infinet.com>
Date: 19 Dec 2000 20:25:26 GMT
Message-ID: <91og7m02tqm_at_enews4.newsguy.com>


Fraser <fraser_diane_at_hotmail.com> wrote:
> Could someone help me with the sql command to compare the column names
> in two Oracle tables. Specifically, I am trying to see which columns
> are present in one table and not the other. Thanks in advance.

(SELECT column_name FROM user_tab_columns WHERE table_name = 'table1' ) MINUS
(SELECT column_name FROM user_tab_columns WHERE table_name = 'table2' )

will give columns in table1 but not in table2 Received on Tue Dec 19 2000 - 21:25:26 CET

Original text of this message