--- query to find records related tables with no match?

2001-12-30 Thread MySQL baby
Ack - sorry - can someone remind me the SQL format for this? if you have a linked CLIENTS and INVOICES table... ...what's the query to find CLIENTS with NO INVOICES? (say 'clientid' is the name of the field in both clients and invoices table) I think it's some kind of join=NULL but I'm stuck.

Re: --- query to find records related tables with no match?

2001-12-30 Thread David J Jackson
From page 165 MySQL (New Riders): LEFT JOIN: SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.i1 = t2.i2 WHERE t2.i2 IS NULL -- david Ack - sorry - can someone remind me the SQL format for this? if you have a linked CLIENTS and INVOICES table... ...what's the query to find CLIENTS with NO