I have seen that yes, and I couldn't get it to work.

At any rate, the code has been written, so I'm just going to leave it :-)

Dan

> You've read this:
>
>
http://www.mysql.com/documentation/mysql/bychapter/manual_SQL_Syntax.html#Rewriting_subqueries
>
> already right? I'm not 100% sure I understand what you are trying to do,
> but it seemed like something I was working on a while ago and this:
>
> SELECT * FROM t1 WHERE id NOT IN (SELECT id FROM t2);
>
> Ended up being what I wanted to do more or less, and so I re-wrote it
> using this:
>
> SELECT table1.* FROM table1 LEFT JOIN table2 ON table1.id=table2.id
>                                         WHERE table2.id IS NULL;
>
> Probaby not what you wanted (especially if Corey didn't give this
> answer), but thought I'd post I've seen people asking about subqueries
> in MySQL from time to time and this helped me.
>
> Adam Augustine


____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to