What datatype to use when storing latitude and longitude data in SQL databases?

This question already has an answer here:

  • What is the ideal data type to use when storing latitude / longitudes in a MySQL database? 18 answers

  • Decimal(9,6)

    如果你不习惯精确和缩放参数,这里是一个格式字符串visual:

    ###.######


    我们使用浮点数,但任何具有6位小数的数字的味道也应该起作用。


    Well, you asked how to store Latitude/Longitude and my answer is: Don't, you might consider using the WGS 84 ( in Europe ETRS 89 ) as it is the standard for Geo references.

    But that detail aside I used a User Defined Type in the days before SQL 2008 finally include geo support.

    链接地址: http://www.djcxy.com/p/16784.html

    上一篇: MySql数据库表中的树数据

    下一篇: 在SQL数据库中存储纬度和经度数据时使用哪种数据类型?