问题出在哪里? 我想用以下SQL语句创建一个表。但我得到一个例外"删除"。
android.database.sqlite.SQLiteException: near "delete": syntax error (code 1): , while compiling: CREATE TABLE data_base_stuff( _id INTEGER PRIMARY KEY AUTOINCREMENT,title TEXT,color TEXT,priority TEXT,created_date TEXT,delete INTEGER)
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1674)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1605)
这是例外
private static final String TEXT_TYP = " TEXT";
private static final String COMMA = ",";
private static final String INTEGER_TYP = " INTEGER";
private static final String SQL_CREATE_TABLE_DATABASE_STUFF = "CREATE TABLE "
+ CheckListColumns.TABLE_NAME + "( "
+ CheckListColumns._ID + INTEGER_TYP + " PRIMARY KEY AUTOINCREMENT,"
+ CheckListColumns.COLUMN_NAME_TITLE + TEXT_TYP + COMMA
+ CheckListColumns.COLUMN_NAME_COLOR + TEXT_TYP + COMMA
+ CheckListColumns.COLUMN_NAME_PRIORITY + TEXT_TYP + COMMA
+ CheckListColumns.COLUMN_NAME_CREATED_DATE + TEXT_TYP + COMMA
+ CheckListColumns.COLUMN_NAME_DELETE + INTEGER_TYP + ")";
结束这是我的代码