Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 296027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:30:39+00:00 2026-05-12T06:30:39+00:00

When storing latitude or longitude data in an ANSI SQL compliant database, what datatype

  • 0

When storing latitude or longitude data in an ANSI SQL compliant database, what datatype would be most appropriate? Should float be used, or decimal, or …?

I’m aware that Oracle, MySql, and SQL Server have added some special datatypes specifically for handling geo data, but I’m interested in how you would store the information in a “plain vanilla” SQL database.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:30:40+00:00Added an answer on May 12, 2026 at 6:30 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really need your help. I have a database with latitude and longitude data,
I have a data table in my SQLite database with information about longitude, latitude
I'm storing a Word document in a SQL Server 2005 database in a varbinary(max)
We're storing some Guid's in a MS SQL database. There's some legacy code that
I'm trying to figure out how to get the most recent latitude and longitude
{data:{columns:[location_id,name,description,latitude,longitude,error,type,type_id,icon_media_id,item_qty,hidden,force_view,allow_quick_travel],rows:[[2,Editor,,43.076014654537,-89.399642451567,25,Npc,1,0,1,0,0,0],[3,Dow Recruiter,,43.07550842555,-89.399381822662,25,Npc,2,0,1,0,0,0],[4,Protestor,,43.074933,-89.400438,25,Npc,3,0,1,0,0,0],[5,State Legislator,,43.074868061524,-89.402136196317,25,Npc,4,0,1,0,0,0]]},returnCode:0,returnCodeDescription:null} I have this JSON string in file. I'm using function to
I'm looking for suggestions for an ideal database or data structure for storing a
Im creating a java web server for storing JSON strings with location data (latitude,
I have a string of data latitude,longitude,location stored as an NSString. I want to
I'm trying to convert CLLocation latitude / longitude to a string. I can successfully

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.