dpmopn8542 2012-12-13 03:05
浏览 48
已采纳

要存储在mysql数据库中的经度和纬度的数据类型?

I'm designing a table in mysql that will store a list of users and a Google Maps co-ordinate (longitude & latitude).

Will I need two fields, or can it be done with 1?

I don't know what I use? what I use float or decimal or GEOMETRY or there is new data type? what are the pros and cons of the best data type to choose it?

  • 写回答

3条回答 默认 最新

  • douken0530 2012-12-13 04:21
    关注

    You can use spatial extensions in mysql the datatype is POINT

    It will be faster in search , and many features for geographic operation.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部