sqlite问题
发布时间:2020-12-12 19:35:58 所属栏目:百科 来源:网络整理
导读:今天遇到一个错误: create or upgrade database main.db error: android.database.sqlite.SQLiteException: there is already an index named type (code 1):,while compiling: CREATE TABLE IF NOT EXISTS type(id INTEGER,name TEXT,level INTEGER,parent
今天遇到一个错误: create or upgrade database main.db error: android.database.sqlite.SQLiteException: there is already an index named type (code 1):,while compiling: CREATE TABLE IF NOT EXISTS type(id INTEGER,name TEXT,level INTEGER,parent INTEGER,PRIMARY KEY(id,name))
原因是我的新表的名字和之前某个表的列名一致,原来还有这个限制 改一下新表的名字,不要再和其他表的列名一样就好了, 好奇怪 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |