Home » SQL & PL/SQL » SQL & PL/SQL » how to get records which are not matching
how to get records which are not matching [message #18789] Thu, 14 February 2002 03:53 Go to next message
ksr
Messages: 112
Registered: January 2002
Senior Member
Hi,
i have 2 tables
tab1(col1,col2,col3,col4,col5)
tab2(col1,col2,col3,col4,col5)

Now i want to get the records which are not matching with each other.

I am able to get the matching records with
select * from tab1 t1,tab2 t2
where
t1.col1 = t2.col1
and t1.col2 = t2.col2
and t1.col3 = t2.col3
and t1.col4 = t2.col4

But how do i get the records which are not matching
Re: how to get records which are not matching [message #18799 is a reply to message #18789] Thu, 14 February 2002 10:22 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
select * from t1
minus
select * from t2


and

select * from t2
minus
select * from t1
Previous Topic: Re: ORA-00937: not a single-group group function
Next Topic: Object access info.
Goto Forum:
  


Current Time: Thu Apr 25 21:40:47 CDT 2024