请教一个oracle数据合并过滤主键的问题
是这样的,我想使用dba权限的用户对不同表空间下的两张表,表A。表B(表结构完全一样),想把B里的数据不定期往A里合并,A表的数据仍然保留,B表的数据会不断增多,脚本示例如下:
insert into user1.Aselect * from user2.B
insert into user1.A as select * from user2.B where user2.B.userId not in (select userId from user1.A) ;