开发者

How to compare two tables each having 500 columns using PL-SQL

开发者 https://www.devze.com 2023-02-28 01:15 出处:网络
I need to compare two tables in different databases and check whether the data in both tables are matching or not.

I need to compare two tables in different databases and check whether the data in both tables are matching or not.

The compare should return a resu开发者_运维百科lt showing rows that don't match using an exact column to column data check.

Is this possible in PL-SQL?


To return all rows in table1 that do not match exactly the rows in table2:

select * from table1 except select * from table2

And to return all rows in table1 that match exactly what is in table2:

select * from table1 intersect select * from table2
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号