× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



select * from table1 where key not in (select key from table2)

Ashish Kulkarni schrieb:
Hi
I have 2 tables which has similar structure, i want to
write a sql statement to compare the 2 tables and find
the missing keys from one
For example Table 1
Key Description
001 This is one
002 This is two

Table 2
Key Description
001 this is one

Now i want to write a query to find out, 002 is
missing in table 2, and may be a query to insert 002
into table2
Any ideas?

Ashish

A$HI$H


____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.