我正在尝试更改定义如下的sqlite表:
String CREATE_TABLE="CREATE TABLE IF NOT EXISTS " + tab_NAME + " (" + row_ID + " INTEGER PRIMARY KEY," + row_NAME + " TEXT," + row_EMAIL + " TEXT," + row_WEBSITE + " TEXT," + row_TELEPHONE1 + " TEXT," + row_TELEPHONE2 + " TEXT," + row_TELEPHONE3 + " TEXT," + row_TELEPHONE4 + " TEXT," + row_TELEPHONE5 + " TEXT);"; db_name.execsql(CREATE_TABLE); String newTab="CREATE TABLE IF NOT EXISTS temp (" + row_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + row_NAME + " TEXT," + row_EMAIL + " TEXT," + row_WEBSITE + " TEXT," + row_TELEPHONE1 + " TEXT," + row_TELEPHONE2 + " TEXT," + row_TELEPHONE3 + " TEXT," + row_TELEPHONE4 + " TEXT," + row_TELEPHONE5 + " TEXT);"; db_name.execsql(newTab);
这是auto_increment alter语句:
String alter="ALTER TABLE temp AUTO_INCREMENT=1;"; ourDatabase.execsql(alter);
我在(1)AUTO_INCREMENT附近收到错误:语法错误
怎么了??任何帮助?