SQLite创建两个表出错
创建两个表出错,把语句合并在一起执行还是会报错
private static final String DATABASE_CREATE = "create table diary " +
"(_id integer primary key autoincrement, "
+ "title text not null, body text not null, created text not null, " +
"name text not null, start text not null, end text not null, " +
"index text not null, place text not null);";
/*
private static final String DATABASE_CREATE_COURSE = "create table course " +
"(_id integer primary key autoincrement, " +
"name text not null, start text not null, end text not null, index text not null, place text not null);";
*/
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(DATABASE_CREATE);
//db.execSQL(DATABASE_CREATE_COURSE);
}
报错信息是
Failure 1 near "index" syntax error on 0x256e10 when preparing ‘crtete table diary....’