日期:2014-05-17 浏览次数:20463 次
declare @T table([经度] numeric(8,5),[纬度] numeric(7,5)) insert @T select 122.23423,23.23234 union all select 123.23678,23.23456 union all select 124.43342,34.23232 select * from @T order by power((纬度-23.23111),2)+power((经度-122.23111),2) /* 经度 纬度 ------------------------------ ------------------------------ 122.23423 23.23234 123.23678 23.23456 124.43342 34.23232 (3 row(s) affected) */