我打算做个论坛,讲发表的主题保存在一张表中,表中ID字段为主键,而且设为自增量。 当我写入时,若SQL语句这样写,无法写入: insert into tb_forumSend values ('"+sort+"','"+title+"','"+content+"','"+account+"','"+ip+"','"+showTime.showTodayTime()+"') 如果写成: insert into tb_forumSend values ('3','"+sort+"','"+title+"','"+content+"','"+account+"','"+ip+"','"+showTime.showTodayTime()+"') 就能写入。 为什么自增量还需要写入? 正确的格式该怎样写?