mysql 两列互转

1.mysql 一张表两列互转

UPDATE 
    tm_position as a,tm_position as b 
SET 
    a.gps_longitude = b.gps_latitude,a.gps_latitude=b.gps_longitude
WHERE a.id=b.id AND a.gps_longitude < 50 AND a.gps_longitude >0;

 

posted @ 2017-09-13 20:02  如.若  阅读(226)  评论(0编辑  收藏  举报