|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all!
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? Thanx. |
|
#2
|
|||
|
|||
|
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).
|
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Indexes & duplicated records |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|