Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: check if the results of two query are the same or not
I think as long as you have a PK it should work.
"slim" <sfar_selim_at_excite.com> wrote in message
news:491f65ba.0205230707.4c00bf74_at_posting.google.com...
> "Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message
news:<1022143464.25395.0.nnrp-01.9e984b29_at_news.demon.co.uk>...
> > various options but pure sql solution would be:
> >
> > select * from
> > (
> > (q1 minus q2) -- all rows from q1 not in q2
> > union all
> > (q2 minus q1) -- all rows from q2 not in q1
> > )
>
> thanks for you, I have yet tried this solution but suppose that q1
return
> for example 3 rows : > col_value > --------- > 7 > 7 > 6 > and q2 return also 3 rows : > col_value > --------- > 7 > 6 > 6 > > Your query should not returns rows but the result of q1 and q2 are not thesame
> > >
![]() |
![]() |