Hi, join two tables in your select. Might look like
insert into mm_tagrules select ID, 'NIL', 'D' from mm_Tag left join mm_tagrules on mm_Tag.ID = mm_tagrules.Tagid where mm_tagrules.Tagid IS NULL; Regards, Thomas Spahni On Tue, 29 Jul 2003, jsmurthy wrote: > Hello All, > > I need to insert into mm_tagrules table from mm_tag table, in the > following way. I am using mysql 4.0.12 version. But Mysql is not supporting > subqueries. Can any one help mysql query for the following query. > > insert into mm_tagrules > select ID, 'NIL', 'D' from mm_Tag where mm_Tag.ID not in (select Tagid from > mm_tagrules) > > Thanks in Advance > Regards > J.S.Murthy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]