获取ORACLE表的所有字段问题 有两个ORACLE数据库,A跟B,分别有一张表A1和B1,两张表字段都一样。我用 select column_name from user_tab_columns where table_name='A1' select column_name from user_tab_columns where table_name='B1'
select column_name from dba_tab_columns where owner='A' and table_name='A1'; select column_name from dba_tab_columns where owner='B' and table_name='B1';
------解决方案--------------------
select column_name from dba_tab_columns where owner='A' and table_name='A1' minus select column_name from dba_tab_columns where owner='B' and table_name='B1';