SELECT `TABLE_1`.* FROM `TABLE_1` JOIN `TABLE_2` USING (`id`) WHERE `TABLE_2`.`id` IS NULL Asuming that the "reference" is the id field...
Regards, Jigal. ----- Original Message ----- From: "Ronan Lucio" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 27, 2004 3:12 PM Subject: Help with query > Hi, > > I have two tables: > > TABLE_1 > ======= > - id > - name > > TABLE_2 > ======= > - id > - table1_id > - name > > How could I make a select on table_1 that returns me only the > rows that donīt have any reference in table_2? > > Any help would be appreciated. > > Thankīs, > Ronan > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > > !DSPAM:417f9f13272296489013257! > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]