At 12:06 +0300 9/19/02, Savaidis wrote:
>Hello!
>
>I have to add  a  .sql  file from MySQL-Front
>
>(insert into mytable ('0','asdf',ecc)) 
>
>that  containts  some dublicates in the unic key.

That sounds self-contradictory.

>
>How can I do this and later to delere the dublicate records?
>
>The unic key has 3 string fields segments.

You can either:

- Create the table, including the unique index, and then load it
   with either INSERT IGNORE or REPLACE
- Create the table, but do not place any index on it yet.  Then load
   then table.  Then add the index using ALTER IGNORE TABLE ... rather
   than ALTER TABLE ... to tell it to ignore (and delete) duplicate
   records when creating the index.

>
>Thanks!
>
>Makis


---------------------------------------------------------------------
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

Reply via email to