MySQL Forums
Forum List  »  Newbie

Re: WHERE AND OR
Posted by: Marc Tonido
Date: January 08, 2009 09:21AM

From what I understand, you need to select a row that matches either of both conditions but not both. If this is the case, use XOR:

SELECT id FROM table1 WHERE column1 = 1 XOR column2 = 7

Options: ReplyQuote


Subject
Written By
Posted
December 31, 2008 05:37AM
December 31, 2008 05:40AM
December 31, 2008 10:07PM
December 31, 2008 10:24PM
Re: WHERE AND OR
January 08, 2009 09:21AM
January 09, 2009 11:21AM


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.