页首Html代码

oracle比较两个库同表栏目差异

 

 select T.COLUMN_NAME,t.data_type ,c.comments 
  from ALL_TAB_COLUMNS T
       ,user_col_comments c
 where 1=1
  and c.table_name = t.table_name 
  and c.column_name=t.column_name
  and t.OWNER='ATS001'
  and T.TABLE_NAME = 'ENTITIES'
minus
 select T.COLUMN_NAME,t.data_type ,c.comments 
 from ALL_TAB_COLUMNS T
       ,user_col_comments c
 where 1=1
  and c.table_name = t.table_name 
  and c.column_name=t.column_name
  and t.OWNER='ATS002'
  and T.TABLE_NAME = 'ENTITIES'
  --union
  /*select T.COLUMN_NAME
  from ALL_TAB_COLUMNS T
 where T.TABLE_NAME = 'ACCOUNTAPPLIES'
  and t.OWNER='ATS002'
*/

 

posted @ 2014-05-22 17:52  binsite  阅读(205)  评论(0编辑  收藏  举报

页脚Html代码