SELECT * <<
rewrite the request to
SELECT field1, field2, field3, ...., field11 FROM myTbl WHERE COALESCE(field1, field2, field3, field11) = '1' ORDER BY field11 LIMIT 30 OFFSET 0
If you want to insert a string usage code as follows:
INSERT INTO table1 ( field2, field3, field4) VALUES ('a', 'test' ,'b' ,'example');
If you want to select all duplicate rows, use:
SELECT id, count(*) as duplicate_count FROM table1 GROUP BY id HAVING duplicate_count > 1
You will need to update those identifiers that are listed as duplicates.
Another option is to add an additional column and delete the old PC.
ALTER TABLE table1 ADD COLUMN new_id unsigned integer not null auto_increment primary key; ALTER TABLE table1 DROP COLUMN id; ALTER TABLE table1 CHANGE COLUMN newid id;
Johan
source share