ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 找出B中没有包括A中对像的同义词的A对像

找出B中没有包括A中对像的同义词的A对像

原创 Linux操作系统 作者:tengrid 时间:2009-05-18 18:57:01 0 删除 编辑
column object_name format a30
select
   a.owner, a.object_name, a.object_type
 from
   dba_objects a
 where
   a.owner = '&BASE_OBJECT_SCHEMA'
   -- choose the appropriate object types for the "base object"
   and a.object_type in
      ('FUNCTION', 'MATERIALIZED VIEW', 'PACKAGE', 'PROCEDURE',
       'SEQUENCE', 'TABLE', 'VIEW')
   and not exists
     (select null from dba_synonyms b
       where
         b.owner = '&SYNONYM_SCHEMA'
         and a.owner = b.table_owner
         and a.object_name = b.table_name
         -- include this line if the synonym must have the same name as the
         -- "base object"
         and b.table_name = b.synonym_name
     )
 order by a.owner, a.object_type, a.object_name ;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/94384/viewspace-600268/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-05-18

  • 博文量
    136
  • 访问量
    378289