2012-07-10 102 views
-1

在我的應用程序中,我創建了一個數據庫(之前與組字段它工作正常)。現在我想cretae多一個字段(稱爲組)。我創建該字段。但顯示以下錯誤:在數據庫中的語法錯誤

android.database.sqlite.SQLiteException: near "group": syntax error: create table incomexpense(_id integer primary key autoincrement,price text not null,description text not null,quantity text not null,total text not null,category text not null,recurrence text not null,date text not null,group text not null); 

我創建命令:

"create table incomexpense(_id integer primary key autoincrement,"+"price text not null,description text not null,"+"quantity text not null,"+"total text not null,"+"category text not null,"+"recurrence text not null,"+"date text not null,"+"group text not null);"; 

回答

4

group是一個關鍵字,那麼在創建表它不應該被使用。

+0

非常感謝..它工作正常..我有點新的android和這個數據庫的概念... – Prakash 2012-07-10 05:18:36

+1

@Prakash,你應該接受這個答案(點擊旁邊的複選標記)。這將讓每個人都知道你的問題已經解決,並給予幫助你的人一些認可。 – Barak 2012-07-10 06:07:18

相關問題