MySQL Forums
Forum List  »  Perl

Re: Not Exists-module
Posted by: Felix Geerinckx
Date: January 25, 2007 11:47AM

Jelmer Wrote:

> And I'm talking about this part:
>
> WHERE id NOT EXISTS (SELECT id FROM categories WHERE title = 'Ajax')


You need IN instead of EXISTS:
WHERE id NOT IN (SELECT id FROM categories WHERE title = 'Ajax')

... EXISTS (SELECT ...) return TRUE or FALSE

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
January 25, 2007 11:17AM
Re: Not Exists-module
January 25, 2007 11:47AM
January 26, 2007 04:38AM
January 26, 2007 04:47AM


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.