首页 新闻 会员 周边

在oracle中,怎样对比两个表中的数据

0
悬赏园豆:100 [待解决问题]

在两个不同的数据库中对比两张相同表中的数据,如果表中哪行数据不一样,打印出来。(比对昨天和当前时间的数据)。哪位能否写个例子?

yysa的主页 yysa | 初学一级 | 园豆:122
提问于:2011-05-18 16:01
< >
分享
所有回答(2)
0

SQL:

1.create database link db1 connect to <用户名> identified by <密码> using <数据库实例名>

2. select a.*,b.*

from table@db1 a

full outer join table b

on a.id=b.id

where a.id is null or b.id is null

参考:http://www.ehow.com/how_7259465_connect-sql-databases-using-sql_plus.html

wgz | 园豆:1254 (小虾三级) | 2011-05-23 18:14
0

导出到excel中对比。

不及格程序员 | 园豆:185 (初学一级) | 2011-08-12 23:00
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册