Version of SQLite used in Android?

0 votes
asked Mar 10, 2010 by eno

What is the version of SQLite used in Android?

Reason: I'm wondering how to handle schema migrations. The newer SQLite versions support an "ALTER TABLE" SQL command which would save me having to copy data, drop the table, recreate table and re-insert data.

3 Answers

0 votes
answered Mar 28, 2010 by yanchenko
$ adb shell
$ sqlite3 --version
sqlite3 --version
3.5.9

Same on ADP1 1.6 & 2.1 emulator.

0 votes
answered Mar 31, 2010 by juri

Although the documentation gives 3.4.0 as reference number, if you execute the following sql, you'll notice that there is a much higher number of SQlite installed:

Cursor cursor = SQLiteDatabase.openOrCreateDatabase(":memory:", null).rawQuery("select sqlite_version() AS sqlite_version", null);
String sqliteVersion = "";
while(cursor.moveToNext()){
   sqliteVersion += cursor.getString(0);
}

This is just a piece of quick, dirty code to retrieve the sqlite version. For instance on a HTC Hero with Android 2.1, I get: 3.5.9.

On my Nexus One with Android 2.2, I even get 3.6.22.

0 votes
answered Sep 15, 2017 by petterson

A short overview of the Andorid APIs and the supported SQLite versions.

enter image description here

The overview is from the link in Mark Carters answer.

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter

...