[英]How replicate data(all dml statement) from one table to another table in different schema oracle
我想将表 A 的数据复制到 B,因为我们在表 B 中有一些不同的列。所以可以复制数据。
模式名称也不同
例子:
表A
(custome_name, customer_desc,create_date,create_user,update_date,update_user)
表 B
(customer_id,custome_name, customer_desc,create_date,create_user,update_date,update_user)
用户B
必须向用户A
授予权限,以便A
可以将数据插入到他们的表中:
grant insert on table_b to a;
然后,用户A
将编写一个INSERT
语句,指定用户B
的table_b
中的哪些列将使用table_a
中的哪些列值填充
INSERT INTO b.table_b (custome_name,
customer_desc,
create_date,
create_user,
update_date,
update_user)
SELECT custome_name,
customer_desc,
create_date,
create_user,
update_date,
update_user
FROM table_a;
而已。
如果用户驻留在不同的数据库中,您将使用数据库链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.