At 03:49 PM 5/13/2002, you wrote:
>Simle query request: I want to display the ID for everyone in a table who 
>is NOT in a second table.
>
>so this is what I have come up with
>
>SELECT student.SID, student.firstName
>FROM student
>WHERE student.SID NOT IN
>     (SELECT msoccerroster.SID
>      FROM msoccerroster)
>
>
>It comes up with an error 1064: SQL syntax near '(SELECT msoccerroster.SID 
>FROM msoccerroster)'
>
>please help
>J

John,
            This will  select all rows from table a that are NOT in table b.

          select  a.*, b.*  from  table1 a  left join  table2 
b  on  a.rcd_id = b.rcd_id  where  b.rcd_id is null

Mike



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