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

For latitudes use: Decimal(8,6), and longitudes use: Decimal(9,6)

If you’re not used to precision and scale parameters, here’s a format string visual:

Latitude and Longitude
##.###### and ###.######

To 6 decimal places should get you to around ~10cm of accuracy on a coordinate.

Leave a Comment

tech