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

Home -> Community -> Usenet -> c.d.o.server -> Re: comparing two table

Re: comparing two table

From: MS <qcom_at_attbi.com>
Date: 17 Jan 2003 11:07:03 -0800
Message-ID: <a2b6d46b.0301171107.45b0b4ba@posting.google.com>


Not sure what you mean by ' gives me only the last one'. Note that "union" does a sort and yields only distinct records. You should try union all, perhaps. Also , I am not sure about the operator precedences, so to make it unambiguous try: (select * from table1 minus select * from table2) union all
(select * from table2 minus select * from table1) ;

HTH. -Madhu S

"alainc" <alain2208_at_caramail.com> wrote in message news:<b08kmc$kdh$1_at_s1.read.news.oleane.net>...
> thanks in fact i found out myself
>
> but i tried
>
> select * from table1
> minus
> select * from table2
> Union
> select * from table2
> minus
> select * from table1;
>
> it's not working it gives me only the last one
>
> does anybody knows why? that's only for personal knowledge
>
> thanks
>
>
> "MS" <qcom_at_attbi.com> a écrit dans le message de news:
> a2b6d46b.0301161142.12b167b4_at_posting.google.com...
> > Try this to compare table1 with table2:
> >
> > select * from table1
> > minus
> > select * from table2;
> >
> > as well as the reverse:
> >
> > select * from table2
> > minus
> > select * from table1;
> >
> > I assume the column order of the tables created is same, else you need
> > to replace the '*' with the column names.
> >
> > -Madhu S
> >
> > "alainc" <alain2208_at_caramail.com> wrote in message
> news:<b05rs8$9fq$1_at_s1.read.news.oleane.net>...
> > > Hello,
> > > i need to compare two table contents in two database (replication
> problem)
> > > so i need to compare not only one column but all.
> > > is there something easy to do not comparing all the column with his
> > > conuterpart on the other database?
> > > because i need to compare more than one table and that will be very long
> to
> > > make the query.
> > >
> > > thanks
> > >
> > > Alain
Received on Fri Jan 17 2003 - 13:07:03 CST

Original text of this message

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