当我创建新表时:
private static final String SQL_CREATE_AREAS = "CREATE TABLE IF NOT EXISTS `cs_area` (" +
" `area_id` mediumint(6) NOT NULL AUTO_INCREMENT,"+
" `areaname` varchar(40) NOT NULL,"+
" PRIMARY KEY (`area_id`),"+
" KEY `areaname` (`areaname`)"+
") DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;";
我得到了错误:
引起:android.database.sqlite.SQLiteException:靠近“AUTO_INCREMENT”:语法错误(代码1):,编译时:CREATE TABLE IF NOT EXISTS
cs_area
(area_id
mediumint(6)NOT NULL AUTO_INCREMENT,areaname
varchar(40)NOT NULL,PRIMARY KEY (area_id
), KEYareaname
(areaname
)) 默认字符集=utf8 AUTO_INCREMENT=13 ;
也许,有人可以帮助我吗?谢谢