编译SELECT查询时出现以下错误:
Caused by: android.database.sqlite.SQLiteException: near "group": syntax error (code 1): , while compiling: SELECT group_id, logo FROM group WHERE group_name = 'Empty Group'
查询创建为:
c = database.query(TABLE_GROUP, new String[]{KEY_GROUPID, KEY_LOGO}, KEY_GROUPNAME + " = '" + description + "'", null, null, null, null);
使用:
TABLE_GROUP = "group";
KEY_LOGO = "logo";
KEY_GROUPID = "group_id";
和表格的创建脚本:
create table group
(group_id integer primary key autoincrement,
group_name text not null,
logo string);
任何人都知道什么是错的?