首页 > 数据库技术 > 详细

交换数据表两个字段值 | SQL

时间:2017-08-18 21:01:10      阅读:432      评论:0      收藏:0      [点我收藏+]
UPDATE temp_ent_lyew t1,temp_ent_lyew t2 SET t1.latitude=t1.longitude,t2.longitude=t2.latitude
where t1.latitude is not null and t1.longitude is not null and t2.latitude is not null and t2.longitude is not null 
and t1.latitude !=‘‘ and t1.longitude !=‘‘ and t2.latitude !=‘‘ and t2.longitude !=‘‘
and t1.longitude<100 and t2.latitude>100;

 

交换数据表两个字段值 | SQL

原文:http://www.cnblogs.com/hezhao/p/7392097.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!