SQLite query where clause with floating point numbers fails?

后端 未结 5 1376
死守一世寂寞
死守一世寂寞 2021-01-13 07:03

I\'m putting a float in an Android based SQLite database, like so:

private static final String DATABASE_CREATE = 
    \"create table \" + DATABASE_TABLE + \"         


        
5条回答
  •  伪装坚强ぢ
    2021-01-13 07:53

    I faced the same issue. My Sqlite column was of type FLOAT. I had to cast my Java variable of type Float as double to make the comparison work.

提交回复
热议问题