注册 登录
编程论坛 SQL Server论坛

求助!关于两个数据库中相同表的不同内容的比较?

sandy186 发布于 2007-04-02 10:18, 832 次点击
两个数据库A B 里面都有相同的表 table1,
table1 里面有三个字段 frmorpt,funit,fqty 现在想比较两张表得到 frmorpt相同但是funit这个字段不相同的 frmorpt,funit,fqty三个字段的信息,指点指点,应该怎么写?
2 回复
#2
sandy1862007-04-02 13:53
select b.frmorpt,b.funit,b.fqty from A..table1 a ,B..table1 b
where A.frmorpt= B.frmorpt and A.funit<> B.funit
就是查询用的时间太长,有没有简单的?
#3
xiyou4192007-04-02 21:17
不懂了,我也只知道这个了.
看看棉花有没有什么办法...
1