我正在尝试为 Android 创建一个数据库表。我的错误信息如下。
08-02 10:16:50.075: E/AndroidRuntime(29093): Caused by:
android.database.sqlite.SQLiteException: near "index": syntax error (code 1): , while
compiling: CREATE TABLE featured_kluster (_id INTEGER PRIMARY KEY AUTOINCREMENT, index
TEXT, term TEXT)
我的 sql 查询有什么问题?
public interface TableKluster extends BaseColumns {
public String table = "featured_kluster";
public String index = "index";
public String term = "term";
public String CREATE = "CREATE TABLE " + table + " ("
+ _ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
+ index + " TEXT, "
+ term + " TEXT)";
}
我不知道索引字段有什么问题..