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

时间:2014-05-24 07:57:41   收藏:0   阅读:266

 

bubuko.com,布布扣
 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‘
*/
bubuko.com,布布扣

 

oracle比较两个库同表栏目差异,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!