SELECT s.* FROM Second s LEFT JOIN First f USING (Flower,Color) WHERE f.Flower IS NULL;
--- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -----Original Message----- From: N. Kavithashree Sent: Tuesday, January 04, 2005 11:17 PM To: mysql@lists.mysql.com Subject: distinctSelection(veryUrgent) hello, i m using mysql 4.0.18-standard version it is not accepting subqurries. problem is: i have 2 tables: First(id,Flower,Color); => color is char(2); Second(Shop,Date,Flower,Color); first table will contain only unique flowers , and colors, id is autoincrement. second table may contain duplicate entries. i want to select from Second table only those Flowers and Colors which are not there in First table. i tried with : select distinct(First.Flower),First.color from First,Second where First.color!=Second.color; but it will select all fileds in first. As this version of mysql will not support for subqurries...problem. can anybody reply with answer? =================================================== kavi =================================================== -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]