Selecting geographical points within area

后端 未结 2 770
臣服心动
臣服心动 2021-01-22 02:13

I have a SQL Server 2008 table with a column of the geography datatype. The value is a point (latitude and longitude).

How do I query the table to return all rows where

2条回答
  •  借酒劲吻你
    2021-01-22 02:31

    You probably want the STDistance method: http://msdn.microsoft.com/en-us/library/bb933952.aspx

    Or the STWithin method: http://msdn.microsoft.com/en-us/library/bb933991.aspx

提交回复
热议问题