--追加到临时表#D中
select *
into #D
from (
select *
from A
where not exists(select * from B
where isnull(A.id,0)=isnull(B.ID,0)
and isnull(A.name,'')=isnull(B.name,'')
and isnull(A.Note,'')=isnull(B.Note,''))union
select *
from B
where not exists(select * from A
where isnull(A.id,0)=isnull(B.ID,0)
and isnull(A.name,'')=isnull(B.name,'')
and isnull(A.Note,'')=isnull(B.Note,''))) C--查询数据
select * from #D--删除临时表
drop table #D
解决方案 »
- 问一个-2147467259(80004005)派生表等级与列列表不匹配的错误
- 储存过程 急!!!!
- 紧急求助,大家帮忙啊,小女子先谢谢大家了!着急啊……
- 求一个存储过程
- *更新表的任何改动
- 麻烦各位高手帮帮我 我的SQLEXPRESS无法启动了
- SQL Server2000中存取Word文件的问题?
- 我是个初学者,我该看那些书了,现在好像有好多书亚,到底哪些值得看了?
- 用order by排序时,如果以两个字段同时排序,f1用升序, f2降序,sql该怎么写
- foxpro中的通用字段的问题!
- Sever2000中的作业管理(jobs)可以调用exe程序吗?
- 有关单表数据处理问题。急求答案!~~谢谢
2,再来建1新表,专门用来分类 用一循环对上表中的数据进行比较,将不同的数据写入新表中即可
这些都用用程序来控制,如果是光写语句会比较困难点