Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

compare two tables - mysql

Hi all.

i have two database called apple and orangel

In the apple i have a table called ABC and the orange also i have a table called ABC. Both ABC table has two field called name, remarks.

now i just want to compare the apple.ABC table to orange.ABC table.

in simple terms, i want to know the records which is not present in the orange.ABC compare to apple. ABC

apple.ABC is upto date. some records are not present in the orange.ABC table.

wanted to identify those missing records.

thanks
kamaraj
 
0
Kamaraj Subramanian
Asked:
Kamaraj Subramanian
3 Solutions
 
magedroshdyCommented:
try this
select *  from apple.ABC where ABC.name not in (select ABC.name from orange.ABC)

Open in new window

0
 
ViaTomCommented:
select a.*
from apple.ABC a
left outer join orange.ABC o on a.name = o.name
where o.name is null
0
 
awking00Commented:
Can names repeat with different remarks?
0
 
awking00Commented:
See attached.
query.txt
0
 
Kamaraj SubramanianApplication Support AnalystAuthor Commented:
Sorry Guys, i didnt get a chance to work on this. Anyway all the answers looks good and hope it will work
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now