甲骨文差异:如何比较两个表? [英] oracle diff: how to compare two tables?
本文介绍了甲骨文差异:如何比较两个表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有两个表t1和t2,它们的布局相同,但是可能包含不同的数据.
Suppose I have two tables, t1 and t2 which are identical in layout but which may contain different data.
区分这两个表的最佳方法是什么?
What's the best way to diff these two tables?
推荐答案
尝试一下:
(select * from T1 minus select * from T2) -- all rows that are in T1 but not in T2
union all
(select * from T2 minus select * from T1) -- all rows that are in T2 but not in T1
;
没有外部工具. union all
没有性能问题.
No external tool. No performance issues with union all
.
这篇关于甲骨文差异:如何比较两个表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文