用dblink执行DDL
对于select,update,insert,delete这些dml,可这样使用 insert into hnfpy2.cs_thz_lv@jdlk_rac_hainan(id,color,is_can_water) select 1 id,'绿色' color,1 is_can_water from dual ; commit; 但对于create,truncate,drop等DDL,需这样使用 declare begin dbms_utility.EXEC_DDL_STATEMENT@jdlk_rac_hainan(' create table hnfpy2.cs_thz_lv( id number(10), color varchar2(100), is_can_water number(1) ) '); commit; end; / declare begin dbms_utility.EXEC_DDL_STATEMENT@jdlk_rac_hainan('truncate table hnfpy2.cs_thz_qi'); commit; end; / declare begin dbms_utility.EXEC_DDL_STATEMENT@jdlk_rac_hainan('drop table hnfpy2.cs_thz_lv'); commit; end; / 来源