store long value in android database

zafi005 picture zafi005 · Sep 25, 2012 · Viewed 20.8k times · Source

How do I store long values in Android SQLite database ? I am trying to store the time(milliseconds) values which comes in long type format .

Answer

keyser picture keyser · Sep 25, 2012

An INTEGER column will handle long values.

From the SQLite site:

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

Datatypes In SQLite Version 3