On Sat, 2001-11-10 at 05:53, John Morton wrote:
> Hi,
> 
> Can someone tell me why this will not work, please
> 
> SELECT * FROM tbl1 WHERE column =(SELECT * FROM tbl2 WHERE intcolumn =
> 15);
> 

There are no subselects in MySQL (yet).  However, they're usually a bad
idea anyway, which is why it's never been such a big rush to get them
in.  In this case, you'd be better served by a join.  Try:

SELECT tbl1.* FROM tbl1, tbl2 WHERE tbl1.column = tbl2.column AND
tbl2.intcolumn = 15;

Steve Meyers


---------------------------------------------------------------------
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

Reply via email to