--- In [email protected], Ski Dawg <[EMAIL PROTECTED]> wrote:
>
> Hello all,
> 
> I am trying to select all values from table1 where table1.id is NOT in
> table2.
> 
> To better explain, table1 has several different records with the primary
> key on the field id (table1.id). table2 also has several other records,
> using table1.id field as a secondary key (table2.secid). I would like to
> get all the records from table1 where the value of id field (table1.id)
> is not in table2 (table2.secid).
> 
> Does anyone know how to do this or can point me to a website that will
> explain how I should do this?
> --
> Doug
> 

I think you may have to create a temporary table which is a copy of
table 1. Then using table 2, find matching records in the temp table
and delete them from the temp table. You will then be left with all
the records that don't match.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to