How to insert double and float values to sqlite?

REAL is what you are looking for. Documentation of SQLite datatypes


SQL Supports following types of affinities:

  • TEXT
  • NUMERIC
  • INTEGER
  • REAL
  • BLOB

If the declared type for a column contains any of these "REAL", "FLOAT", or "DOUBLE" then the column has 'REAL' affinity.


I think you should give the data types of the column as NUMERIC or DOUBLE or FLOAT or REAL

Read http://sqlite.org/datatype3.html to more info.


Each value stored in an SQLite database has one of the following storage classes − You can use either one of them REAL or DOUBLE or BLOB or NUMERIC. Details are given below:

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

BLOB: The value is a blob of data, stored exactly as it was input.

INTEGER: The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value.

NUMERIC: This column may contain values using all five storage classes.

For more detailed information: SQLite Data Type