MySQL Forums
Forum List  »  Newbie

Re: Compare identical tables and return the difference
Posted by: Marvin Eads
Date: May 18, 2005 08:54AM

SELECT draft.PrimaryKey
FROM draft LEFT JOIN production ON draft.PrimaryKey = production.Primarykey
WHERE production.Primarykey Is Null
UNION
SELECT production.PrimaryKey
FROM production LEFT JOIN draft ON production.PrimaryKey = draft.Primarykey
WHERE draft.Primarykey Is Null

Options: ReplyQuote


Subject
Written By
Posted
Re: Compare identical tables and return the difference
May 18, 2005 08:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.