0

I've:

public void onCreate(SQLiteDatabase db) {
        String sql=String.format(
                "create table %s"+"(%s int primary key, %s int, %s text, %s int, %s text)",
                TABLE, Column_ID, Column_Descreption, Column_Price, Column_Photo_URL);

        db.execSQL(sql);
    }

My question is: are there any additional types beside int and text? Because I need to store boolean and double.

Idan Moshe
  • 1,675
  • 4
  • 28
  • 65

2 Answers2

0

For fast start take a look on this discussion: What is the difference between related SQLite data-types like INT, INTEGER, SMALLINT and TINYINT?

Then go to this article: http://www.vogella.com/articles/AndroidSQLite/article.html

Shortly java's double called real in Sqlite terms. Other details are described in resources I have mentioned. Good luck.

Community
  • 1
  • 1
AlexR
  • 114,158
  • 16
  • 130
  • 208
0

As you can see here SQLite datatype, boolean or double value doesn't exist. For storing those types you have to use or String value or Integer value (only for emulate Boolean. 0 is false, 1 is true) or REAL value for floating point value

kinghomer
  • 3,021
  • 2
  • 33
  • 56