The steps would be

  1. copy the record to temp table
  2. modify the column you would like to
  3. 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;

Leave a Reply