Tag Info

New answers tagged

2

Supposing you have no foreign keys referencing that table, you could do something like create table some_table as select min(id), name, age, x from t group by name, age, x then you can drop the old table, rename the new table so that it has the same name as the old one before, and create indexes and other things you need on that table.


0

You can use group concat for this. example mysql> select * from dummy; +----+-------+ | id | name | +----+-------+ | 1 | fiest | | 1 | fiest | | 1 | sec | +----+-------+ 3 rows in set (0.00 sec) mysql> select group_concat(id) from dummy group by id; +------------------+ | group_concat(id) | +------------------+ | 1,1,1 | ...



Top 50 recent answers are included