问个sql问题 两个表的结构完全一样,但是我要实现的的是table1里面有的id,就不从table2中select出来insert into table1 (select * from table2); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 insert into table1 (select * from table2 where id not in (select id from table1)); insert into table1 (select * from table2 where not exists (select * from table1 where table2.id=table1.id)); insert into table1 (select * from table2 where id not in(select id from table1)); 你是不是要用 minus 或 union 呢?抱歉 没看懂 你啥意思 select * from table1minusselect * from table2 oracle和java无法连接 oracle10g安装后的中文乱码问题 oracle10g 中查询用户(giapuser)下字段(sjgxr)为空的所有表 SQL查询数据慢,求优化 如何在数据库中随机取出3条数据 命令“net stop OracleServiceORCL”和“shutdown”的区别? 大虾请进:在FR6下安装oracle 10 的问题 客户这样问我? oracle基础知识分享 关于直接查询cursor 关于动态游标的问题 奇怪,分组SQL语句的问题得到明细结果和总结果不一致!!!!
(select * from table2 where not exists (select * from table1 where table2.id=table1.id));
minus
select * from table2