I am trying to achieve the same thing as asked in this question sql swap primary key values but I can't seem to get it running with newer mysql versions becausue of the error message Error Code: 1706. Primary key/partition key update is not allowed since the table is updated both as 't' and 't2'.
My table would look like this
id name
---------
1 john
id name
---------
2 jim
and expected result would look like this
id name
---------
2 john
id name
---------
1 jim
Is there any "one-liner" for that?