redox has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: (OT) MYSQL problem
by davidrw (Prior) on May 11, 2005 at 02:04 UTC
    I think SQL's DISTINCT will get you what you want (I'm assuming the scope of the question is just SQL {so it's OT}, and not DBI usage -- if it is, check tutorials/docs/search for DBI for a plethera of info and post back w/what's causing problems).
    INSERT INTO last_visits ( id, domain ) SELECT DISTINCT id, domain FROM heap_in