标签:fun nis oat creat ret float returns atl return
CREATE FUNCTION getDistance (latl FLOAT, lonl FLOAT, lat2 FLOAT, lon2 FLOAT)
RETURNS FLOAT
DETERMINISTIC
RETURN ROUND(6378.138 * 2 * ASIN(SQRT(PON(SIN((latl * PI() / 180 - lat2 * PI() / 180) / 2), 2) + COS(latl * PI() / 180) *
C0S(lat2 * PI() / 180)
* PON(SIN(( lonl * PI() / 180 - lon2 * PI() / 180 ) / 2),2))),2);
标签:fun nis oat creat ret float returns atl return
原文地址:https://www.cnblogs.com/watchfluture/p/12616927.html