sqlite中的除法返回整数值
sqlite> select totalUsers/totalBids from
(select (select count(*) from Bids) as totalBids ,
(select count(*) from Users) as totalUsers) A;
1
我们可以对结果进行类型转换以获得除法结果的真实值吗?
发布于 2016-07-13 18:25:00
或者,如果您想要基于文本列更新列:
UPDATE table_with_fields SET real_field=cast(field_with_txt AS real)
https://stackoverflow.com/questions/8305613
复制相似问题