将已有的lng lat 字段转换成point类型字段

  利用拼接字符串转换point

select GeomFromText(CONCAT('POINT(',lng,' ',lat,')')) from community limit 1;

  插入字段到新表

create table communityN as select *,GeomFromText(CONCAT('POINT(',lng,' ',lat,')')) location from community;

posted @ 2019-02-25 16:35  渔阳nice  阅读(603)  评论(0编辑  收藏  举报