更新时间:2023-12-01 10:40:10
创建两个视图并将数据转储到其中.确保它们具有相同的列结构.
然后像现在一样使用UNION
或EXCEPT
比较这两个视图.
Create two views and the dump the data in them. Make sure they have the same column structure.
Then compare the two views usingUNION
orEXCEPT
just like you have done now.
尝试一下,
try this,
select * from
(
select * from tbl1
except
select * from tbl2
) as a
union all
select * from
(
select * from tbl2
except
select * from tbl1
) as a
祝您编码愉快!
:)
Happy Coding!
:)