Dom*_*azi 1 java sqlite android android-sqlite
错误信息:
android.database.sqlite.SQLiteException: near "transaction": syntax error (code 1): , while compiling: **create table transaction ( _id integer primary key autoincrement, amount real, type varchar(20), date integer)
Run Code Online (Sandbox Code Playgroud)
我的应用程序存储由自动生成的ID,花费的金额,付款类型和日期组成的货币交易.我的应用程序编译正常,但是当我尝试运行数据库是sqlite数据库的活动时,应用程序崩溃了上面的消息.至于我意识到我的SQL语句是有效的,任何人都可以提供任何可能是原因的洞察力吗?
Java代码:
db.execSQL("create table transaction (" +
" _id integer primary key autoincrement, amount real, type varchar(20), date integer)");
Run Code Online (Sandbox Code Playgroud)
谢谢