Suppose a table fruits that looks like this:
------------------------------------------
| id | name | color | calories |
-------------
Here's a way to store values temporarily without using a temp table or a dummy row in your fruit table:
SELECT name, color, calories FROM fruit WHERE id = 2 INTO @name, @color, @calories;
UPDATE fruit AS f1, fruit AS f2
SET
f1.name = f2.name, f2.name = @name,
f1.color = f2.color, f2.color = @color,
f1.calories = f2.calories, f2.calories = @calories
WHERE (f1.id, f2.id) = (2, 5);
Here's another solution that uses a dummy id value:
UPDATE fruit SET id = 0 WHERE id = 5;
UPDATE fruit SET id = 5 WHERE id = 2;
UPDATE fruit SET id = 2 WHERE id = 0;