I'm currently trying to SELECT columns from a table, do some arithmetic with the selected values and then INSERT the updated values back into the same table. So far, I'm thinking of SELECT all columns, copy to another table, UPDATE that table and copy it back but this seems kinda redundant.
INSERT INTO tableB (x, y) SELECT x, y FROM tableA;
UPDATE tableB SET y = y + 1;
INSERT INTO tableA (x, y) SELECT x, y FROM tableB;
where x and y are declared UNIQUE(x, y)
EDIT: Is there a way to avoid creating another table for this transaction?