将已有的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;

原文地址:https://www.cnblogs.com/CHWLearningNotes/p/10431669.html