Re: [SQL] Selecting records not present in related tables

2005-10-06 Thread Anthony Molinaro
Jeziel,   there are a couple techniques you can try, two I like are set difference and anti-joins.   here’s the set diff:   select id   from messages except select id   from usermessages   that will returns all id from messages not in usermessages   if ID is indexed on both

Re: [SQL] Selecting records not present in related tables

2005-10-06 Thread Scott Marlowe
On Thu, 2005-10-06 at 14:43, Hector Rosas wrote: > Hello, I'm trying to select records in a table not present in a > related table, in example, I've a table with message information > (subject, message, date, etc) and another (usermessages) with where > user(s) has that message, its state, etc. Rec

Re: [SQL] Selecting records not present in related tables

2005-10-06 Thread Frank Bax
At 03:43 PM 10/6/05, Hector Rosas wrote: Hello, I'm trying to select records in a table not present in a related table, in example, I've a table with message information (subject, message, date, etc) and another (usermessages) with where user(s) has that message, its state, etc. Records in thi