为什么总是说我的主键插入重复啊? insert 2号表 select * from 1号表 where id not in (select id from 2号表) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 insert into 2号表 (select * from 1号表 where 1号表.id not exists (select id from 2号表)) insert 2号表 select a.* from 1号表 a left join 2号表 bon a.id=b.idwhere b.id is null InSert 2号表 select a.* from 1号表 a Left Join 2号表 b on a.id=b.idWhere b.Id is null 另外我想问一下,是用以上各位所说的方式快呢,还是采用DTS数据包快?因为这两个表将位于不同的SERVER上,谢谢。 导入导出数据,选择由一sql语句导入,根据提示键入“select * from 1号表 where id not in (select id from 2号表)” select * from 1号表 where id not in (select id from 2号表) sql之艰难登录 求sql语句一条 导入脚本时出现错误 转换表的结构 这个问题怎么解决啊。。。。。。。。。。 关于SQL应用的问题 该分页存储过程如何同时返回值和结果集? 如何执行外部sql语句 sql server能否安装在windows 2000 professional上 windows2000pro可以装sqlserver吗 如何跨服务器对两个数据表进行查询? 遇到这样的问题,我该如何的时间表,不知道我时间的是不是好
(select * from 1号表 where 1号表.id not exists (select id from 2号表))
on a.id=b.id
where b.id is null
select a.*
from 1号表 a Left Join
2号表 b on a.id=b.id
Where b.Id is null
因为这两个表将位于不同的SERVER上,谢谢。