Android sqlite int sync error

Asked 2 years ago, Updated 2 years ago, 81 views

final public String CREATE_FAVORITE_SONG_TABLE_QUERY =
        "CREATE TABLE " + FAVORITE_SONG_TABLE_NAME + " (" +
                "ID INTEGER PRIMARY KEY," +
                "favorite_id int(10)," +
                "sound_res char(30)," +
                "sound_name char(30)," +
                "volume int(10)," +
                "ismute int(1)," +
                "check int(1)" +
                ");";

The sauce is like this.

near "int": syntax error (code 1): , while compiling: CREATE TABLE FAVORITESONG (ID INTEGER PRIMARY KEY,favorite_id int(10),sound_res char(30),sound_name char(30),volume int(10),ismute int(1),check int(1));

There's an error like this.

android syntax sqlite syntax-error

2022-09-22 16:50

1 Answers

Change int() to integer.


2022-09-22 16:50

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.