Re: updating table but afterwards there are duplicate entries that violate a key..

2006-09-29 Thread Gerald L. Clark

Peter Van Dijck wrote:

Hi all,
I have a table like this

TABLE
--
tagid
taggerid
objectid

There is a primary key on (tagid, taggerid, objectid).

First I remove that key, then I am changing the object id (because
I've changed my objects), but what happens now is that I suddenly have
duplicate (tagid, taggerid, objectid) rows.

Is there a way to remove duplicate rows like this?

Thanks for any pointers!!

Peter



Use
ALTER TABLE IGNORE
and put the key back.

--
Gerald L. Clark
Supplier Systems Corporation

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



updating table but afterwards there are duplicate entries that violate a key..

2006-09-29 Thread Peter Van Dijck

Hi all,
I have a table like this

TABLE
--
tagid
taggerid
objectid

There is a primary key on (tagid, taggerid, objectid).

First I remove that key, then I am changing the object id (because
I've changed my objects), but what happens now is that I suddenly have
duplicate (tagid, taggerid, objectid) rows.

Is there a way to remove duplicate rows like this?

Thanks for any pointers!!

Peter

--
Find 1s of videoblogs and podcasts at http://mefeedia.com
my blog: http://poorbuthappy.com/ease/
my job: http://petervandijck.net

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]