从位置限制10
中选择名称,lat,lng如果我想在lat和amp的小数位后面有特定的位数,该怎么办? lng恰好是浮点值?
答案 0 :(得分:1)
如果X是您想要的位数:
select name, round(lat, X, 1), round(lng, X, 1)
from locations limit 10
如果你想要它舍入和截断,请取出圆函数的1参数。
答案 1 :(得分:0)
假设你想得到.3
select name , lat , lng from locations
where lat like '%.3' and lng like '%.3'
limit 10