作者:晴子suerw_980 | 来源:互联网 | 2023-08-25 12:15
privatestaticfinalStringDATABASE_TABLE_TRANSTransaction;privatestaticfinalStringDAT
private static final String DATABASE_TABLE_TRANS = "Transaction";
private static final String DATABASE_CREATE_TRANS =
"create table " + DATABASE_TABLE_TRANS + "(_id integer primary key autoincrement, "
+ "Amount text not null, " + "Name_of_bank text unique not null, "
+ "Trans_Time text not null);";
public void onCreate(SQLiteDatabase db)
{
System.out.println("oncreate of dbbbbbbbbbbbbbbbbb");
db.execSQL(DATABASE_CREATE_TRANS);
}
while running I get the error:
在运行时我收到错误:
08-05 14:40:15.187: ERROR/AndroidRuntime(5362):
android.database.sqlite.SQLiteException: near "Transaction": syntax
error: create table Transaction(_id integer primary key autoincrement,
Amount text not null, Name_of_bank text unique not null, Trans_Time
text not null);
What have I done wrong?
我做错了什么?
2 个解决方案