2010年11月4日木曜日

mysqlで緯度経度から距離を取得するSQL

select *,round(sqrt(pow((lat1 - lat2)/0.0111, 2) + pow((lot1 - lot2)/0.0091, 2)), 1) as dis from hoge