Re: how to prevent inserting duplicate rows?

2001-06-25 Thread Seth Northrop
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. See REPLACE into tablename http://www.mysql.com/doc/R/E/REPLACE.html Take care, seth

how to prevent inserting duplicate rows?

2001-06-24 Thread Yee Chuan Loh
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