AI智能
改变未来

Oracle同义词创建

create or replace synonym Pro_MMM_GetAutoincrement
  for JHMMM.Pro_MMM_GetAutoincrement; 

select \’create or replace synonym \’||t.TABLE_NAME ||\’ for \’ ||t.OWNER || \’.\’||t.TABLE_NAME ||\’;\’  from dba_tables t
where owner = \’JHMMM\’

select \’delete from  \’||t.TABLE_NAME ||\’;\’  from dba_tables t
where t.owner = \’JHHMS\’ and t.TABLE_NAME like \’QUALITY%\’

select \’drop synonym \’||t.TABLE_NAME ||\’;\’  from dba_tables t
where owner = \’JHMMM\’

select \’drop table \’ || t.TABLE_NAME || \’;\’ col1,\’create table \’ || t.TABLE_NAME ||
       \’ as select * from \’ || t.TABLE_NAME || \’@db_link_84;\’ col2
  from all_tables@db_link_84 t
 where t.OWNER = \’JHHMS\’
   and t.TABLE_NAME like \’EDU_%\’
 

赞(0) 打赏
未经允许不得转载:爱站程序员基地 » Oracle同义词创建