Re: quick sql question

2002-05-10 Thread Augey Mikus
I suppose the i could always remove the unique constraint once the alter statement has removed the duplicates. ok Paul DuBois wrote: > At 18:13 -0400 5/10/02, Augey Mikus wrote: > >> so i suppose an automatic delete of every duplicate record is out of >> the question :-) > > > Sounds like you

Re: quick sql question

2002-05-10 Thread Paul DuBois
At 18:13 -0400 5/10/02, Augey Mikus wrote: >so i suppose an automatic delete of every duplicate record is out of >the question :-) Sounds like you're trying to have it both ways. > >Paul DuBois wrote: > >>At 18:00 -0400 5/10/02, Augey Mikus wrote: >> >>>is there a way for me to do it in a mysql

Re: quick sql question

2002-05-10 Thread Augey Mikus
so i suppose an automatic delete of every duplicate record is out of the question :-) Paul DuBois wrote: > At 18:00 -0400 5/10/02, Augey Mikus wrote: > >> is there a way for me to do it in a mysql delete statement? just out >> of curiosity, for instance, if i wanted to add duplicates later fo

Re: quick sql question

2002-05-10 Thread Augey Mikus
thanks :-) Paul DuBois wrote: > At 18:00 -0400 5/10/02, Augey Mikus wrote: > >> is there a way for me to do it in a mysql delete statement? just out >> of curiosity, for instance, if i wanted to add duplicates later for >> whatever reason. > > > Okay, let's suppose you have 3947 instances o

Re: quick sql question

2002-05-10 Thread Paul DuBois
At 18:00 -0400 5/10/02, Augey Mikus wrote: >is there a way for me to do it in a mysql delete statement? just >out of curiosity, for instance, if i wanted to add duplicates later >for whatever reason. Okay, let's suppose you have 3947 instances of "abc". You can use LIMIT for this: DELETE FROM

Re: quick sql question

2002-05-10 Thread Augey Mikus
is there a way for me to do it in a mysql delete statement? just out of curiosity, for instance, if i wanted to add duplicates later for whatever reason. Paul DuBois wrote: > At 17:54 -0400 5/10/02, Augey Mikus wrote: > >> what i meant is deleting duplicate occurences of records of a certain

Re: quick sql question

2002-05-10 Thread Paul DuBois
At 17:54 -0400 5/10/02, Augey Mikus wrote: >what i meant is deleting duplicate occurences of records of a >certain field. ...sorry... Ah. One thing you can do is add a unique index on that field with ALTER IGNORE TABLE tbl_name ADD UNIQUE (col_name) or ALTER IGNORE TABLE tbl_name ADD PRIMARY KE

Re: quick sql question

2002-05-10 Thread Augey Mikus
what i meant is deleting duplicate occurences of records of a certain field. ...sorry... Paul DuBois wrote: > At 17:16 -0400 5/10/02, Augey Mikus wrote: > >> what is the simplest way to delete duplicate occurences of a specific >> field in mysql? >> >> thanks, >> >> augey > > > Your question

Re: quick sql question

2002-05-10 Thread Paul DuBois
At 17:16 -0400 5/10/02, Augey Mikus wrote: >what is the simplest way to delete duplicate occurences of a >specific field in mysql? > >thanks, > >augey Your question is a bit ambiguous. You could do this by using ALTER TABLE to remove the column itself from the table, for example, but I'm guessi