List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 19 2002 2:10pm
Subject:Re: insert and deletind dublicating
View as plain text  
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

Thread
Trying to get openssl working with MySQL 4.0.3-betaMatthew Scarrow3 Sep
  • secure mySQL connectionBen Joyce3 Sep
  • speeding up by spliting tables?Savaidis14 Sep
    • Re: speeding up by spliting tables?peter.brawley14 Sep
    • Re: speeding up by spliting tables?Paul DuBois14 Sep
  • insert and deletind dublicatingSavaidis19 Sep
    • re: insert and deletind dublicatingVictoria Reznichenko19 Sep
    • Re: insert and deletind dublicatingPaul DuBois19 Sep
      • RE: insert and deletind dublicatingSavaidis19 Sep
        • RE: insert and deletind dublicatingPaul DuBois19 Sep
          • RE: insert and deletind dublicatingSavaidis19 Sep