As I understand it, you can only list distinct values in an IN clause -
MySQL doesn't yet support subqueries here - according to the manual. See
page 139 of the pdf manual.
-----Original Message-----
From: Bobby Chopra [mailto:[EMAIL PROTECTED]]
Sent: Thu, 26 April 2001 14:10
To: [EMAIL PROTECTED]
Subject: Using the IN function
Probably a simple question:
I am returning back to SQL after a break, and I was sure that I could do the
following when using the IN function:
SELECT field1 FROM table1 where field1 NOT IN (SELECT DISTINCT field2 FROM
table2);
but clearly not.
Could anyone suggest what I am doing wrong, or is this type of statement not
valid syntax.
Cheers
Bobby Chopra
Applications Developer
::Source New Media::
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php