可以通过建立DBLINK
create database link J_DB
connect to username1 identified by password1
using '(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 111.11.11.111)(PORT = 1521))
(CONNECT_DATA =
(SERVER = username2)
(SERVICE_NAME = password2)
) )';
插入数据:
insert into J_MID_TF_INFOUSER nologging (USER_ID,PRODUCT_ID) select USER_ID,PRODUCT_ID from MID_TF_INFOUSER@J_DB;
你把测试库中工资表的数据导入正式库不就可以了么?
把测试数据库中的工资表导出来,然后再导入到你正式表中去。注意:把你正式表的那个工资表先删除掉才能导入成功!
insert into 会将查询结果保存到已经存在的表中
insert into t2(column1, column2, ....) select column1, column2, .... from t1