gpt4 book ai didi

sqlite - 在 SQLite 数据库中存储经度和纬度的数据类型是什么?

转载 作者:行者123 更新时间:2023-12-03 17:52:15 25 4
gpt4 key购买 nike

我创建了一个包含字段的表 map_latitudemap_longitude在数据类型为 REAL 的 Sqlite 数据库中。

但是当我在 Toast Message 中从数据库中检索数据时,我看到它只有零小数点。

例如:

15.31894  
store as 15.0

我该如何解决这个问题?

最佳答案

您应该使用 数据类型 REAL .

The value is a floating point value, stored as an 8-byte IEEE floating point number.



安全方法是 -> 使用 TEXT

关于sqlite - 在 SQLite 数据库中存储经度和纬度的数据类型是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46732157/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com