为什么这么问呢
主键是不能重复的,和varchar2还是number无关
怎么解决要看你怎么处理,如果要插入的数据的主键在第二张表中已经存在的话,你要怎么处理,是不插入,还是修改已存在的记录
可以试试用merge into
merge into table2 a
using table1 b
on (a.id=b.id)
when matched then
update set a.col1=b.col1,a.col2=b.col2,a.col3...
when not matched then
insert values(b.id,b.col1,b.col2....)
如果不处理,且数据库为10g以上版本,when matched部分可以不填写
根据需要来修改