oracle如何比较两个表数据的差异?
1个回答
展开全部
est表:
test1表:
现在要找出两张表有差异的数据,需要用minus及union的方式查找出来,语句如下:
select t1.* from(select * from testminusselect * from test1) t1union select t2.* from(select * from test1minusselect * from test) 1
select t1.* from
(select * from test
minus
union
select t2.* from
(select * from test1
minus
select * from test) t2;
select t1.* from
(select * from test
minus
select * from test1) t1
union
select t2.* from
(select * from test1
minus
select * from test) t2;
红框部分的数据就是有差异的内容。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询