- 同样的查询是在两个表跑
- 两个表都驻留在不同的模式
- 数据库表5的一部分,或者可能是不一样的
- 如果数据库是不同样,不能保证它们的版本或补丁级别
- 数据的顺序在两个表中都是相同的。数据进行排序
- 可能的是,一个表具有多个列,则其他
- 可能的是,一个表具有多个行,则其他
我看到它有2个不同的challanges
- 运行比较
- 产生清晰的报告,概述了不同
不知下面的方法是有效的
If (table1 and table 2 have the same number of columns)
For every row found in table1 check
If that same identical row exists in table2
And if it does not due to some column mismatch
Find the closes match possible and report column differences
If best match can be discovered, report column difference, else
report can result is ambiguous
...
这是一个合理的做法?鉴于上面的一些假设,你能推荐一种替代方案吗?