Wouldn't "select table1.id from table1, table2 where table1.id != table2.t1id and table2.id = 9" work? Joins don't have to include output columns from both tables, but columns from both tables can (and should, unless you want cartesian products) appear in the WHERE clause.
-Mark ----- Original Message ----- From: "Jesper Öman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 11, 2002 5:20 PM Subject: Subselect translation? Hi, I have a little problem making a query with only one SELECT phrase; I wan't to solve this with a JOIN since sub-selects are not supported in MySQL: select table1.id from table1 where table1.id not in(select table2.t1id from table2 where table2.id = 9) I can't imagine this not being possible in any other way. /Jesper Öman, Sweden --------------------------------------------------------------------- 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