Sunday, 15 April 2012

mysql - SQL Entry's Duped -



mysql - SQL Entry's Duped -

i messed when trying create test database , accidently duplicated within of table. there 2 of every entry there 1 time before. there simple way prepare this? (using innodb tables)

yet reason utilize auto incrementing primary keys. way, rows wouldn't total duplicates.

probably fastest way re-create info table, truncate first table, , re-insert it:

create temporary table tmp select distinct * test; truncate table test; insert test select * tmp;

as little note: in cases, recommend using finish column list on insert statement. 1 case optional. after all, putting columns in table , putting them statement later.

mysql duplicates duplicate-removal heidisql

No comments:

Post a Comment