摘要: 问题:将Table1中存在而Table2中不存在的记录插入到Table2中,用一句SQL写出?该问题的重点在于 Except 的原理:个人理解,通俗讲就是 (A表的记录-B表的记录)的差值结果,但是去除重复的记录。也就是以左表为参照表,查询中返回右表中没有找到的所有非重复的记录。测试代码:create table #Test1( id int, name varchar(50));create table #Test2( id int, name varchar(50))goinsert into #Test1 values (1,'Nicholas1');insert... 阅读全文
posted @ 2012-05-19 17:57 echo- 阅读(205) 评论(0) 推荐(0) 编辑