Posted By

fugue on 10/05/10


Tagged

mysql swap


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

bobbym245
jeremydouglass


Swap values for two columns in MySQL table


 / Published in: MySQL
 

  1. UPDATE mytable SET columnA=(@temp:=columnA), columnA = columnB, columnB = @temp;

Report this snippet  

You need to login to post a comment.