--create database link
create database link remoteDatabase connect to userName identified by password using 'ServiceName';begin
for t in (select table_name from user_tables@remoteDatabase)
loop
dbms_output.put_line(t.table_name);
execute immediate 'create table '||t.table_name||' as select * from '||t.table_name;
exit when i>10;
end loop;
exception
when others then
dbms_output.put_line(SQLERRM);
raise;
end;
create database link remoteDatabase connect to userName identified by password using 'ServiceName';begin
for t in (select table_name from user_tables@remoteDatabase)
loop
dbms_output.put_line(t.table_name);
execute immediate 'create table '||t.table_name||' as select * from '||t.table_name;
exit when i>10;
end loop;
exception
when others then
dbms_output.put_line(SQLERRM);
raise;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货