SQLServer中获取图形的最大面积

 

--获取shape的最大面积
select MAX(shape.STArea()) as area_max from CBDKXX
SELECT DKBM,MAX(shape.STArea()) as area_max FROM CBDKXX GROUP BY DKBM

--获取shape的最大面积,及该地块的相关信息
select DKBM,shape.STArea() as area from CBDKXX where shape.STArea() = (select MAX(shape.STArea()) from CBDKXX)

 

posted @ 2018-08-27 22:59  ParanoiaApe  阅读(271)  评论(0)    收藏  举报