0
点赞
收藏
分享

微信扫一扫

155-mysql 取两点之间的距离

念川LNSC 2022-12-26 阅读 151

mysql 取两点之间的距离,单位为: 米

st_distance_sphere(point(a.jd, a.wd), point(b.jd, b.dw))

示例:

set @p1=point(118.659802, 24.885497);
set @p2=point(118.671475, 24.867432);
select st_distance_sphere(@p1,@p2) 

结果:
2328.436587875269

举报

相关推荐

0 条评论