I have a \"tasks\" table with a priority column, which has a unique constraint.
I\'m trying to swap the priority value of two rows, but I keep violating the constrai
Had a similar problem.
I wanted to swap 2 id's that were unique AND was a FK from an other table.
The fastest solution for me to swap two unique entries was:
SET FOREIGN_KEY_CHECKS=0;SET FOREIGN_KEY_CHECKS=1;