Fork me on GitHub

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

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;

 

posted @ 2017-08-18 20:36  何钊  阅读(724)  评论(0编辑  收藏  举报