Hello,
I have a table where for each row, the <column 1, column 2> tuple is
unique (when creating the table, i did a UNIQUE INDEX index1 (col1, col2))
I wrote a perl program to read lines from a file and insert accordingly
into the table.
How do I prevent insertions of duplicates? (as in during the insertion
loop, if duplicates exists do not insert but carry on with the rest of the
file)
On a similar note, how do I OVERWRITE the previous entry in the
table? ie. is there a SQL command to do like INSERT, but if duplicate
found, overwrite with the new value.
THanks.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php