Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: check if the results of two query are the same or not

Re: check if the results of two query are the same or not

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 23 May 2002 09:45:23 +0100
Message-ID: <1022143464.25395.0.nnrp-01.9e984b29@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 )

If you get any rows, then the queries are not the same.

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Author of:
Practical Oracle 8i: Building Efficient Databases

Next Seminar - Australia - July/August
http://www.jlcomp.demon.co.uk/seminar.html

Host to The Co-Operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html



slim wrote in message <491f65ba.0205230026.4760a4b2_at_posting.google.com>...

>Hi,
>How can I check that the results of two query (q1 and q2) are exactly the
same
> thank you
Received on Thu May 23 2002 - 03:45:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US