August 8th, 2000, 04:22 AM
Such a problem: i have a table with multiple unique index. Sometimes i need to add some information from txt-file, but records may duplicate; MySQL stops this operation and not adds the rest (maybe, not duplicated) records. How can i solve this problem?
August 8th, 2000, 08:41 AM
You can either use the REPLACE command (in the docs, look under replace in the index) which will first delete the duplicated entry from the database and insert the new one, or you could write a simple script to go through and only insert when there isn't a duplication (a Perl script to do this would probably only run to a few lines).