sql 计算空间列两地点之间距离

SELECT a.Remark,b.stationcode otherstationid,
CAST( a.GeoCol.STDistance(b.GeoCol) AS int) distance
FROM ALLbaseStation a JOIN allotherStation b ON 1=1
WHERE
CAST( a.GeoCol.STDistance(b.GeoCol) AS int)<5000

原文地址:https://www.cnblogs.com/fanshaomin/p/7418919.html