MySQL – copy record in the same table
The steps would be
- copy the record to temp table
- modify the column you would like to
- copy back to the original table
CREATE TEMPORARY TABLE tmp SELECT * FROM table_1 WHERE column_1 = 111;
UPDATE tmp SET column_1 =1 WHERE column_1 = 111;
INSERT INTO table_1 SELECT * FROM tmp WHERE column_1 = 1;