日期:2014-05-18 浏览次数:20654 次
insert into t2(id,title,link,addtime) select t1.id,t1.title,t1.link,t1.addtime from t1 left join t2 on t1.title=t2.title and t1.link=t2.link where t2.id is null
------解决方案--------------------
有两两张表t1 t2结果相同 结构 t1 id Title Link AddTime t2 id Title Link AddTime -------------------------- insert into t2 select * from t1 a where not exists(select 1 from t2 where title=a.title and link=a.link)