我的表结构:
id int AUTO_INCREMENT PRIMARY KEY
title text
url text
age int
这是我尝试将数据保存到此表中的方式:
PreparedStatement ps=con.prepareStatement("insert into table(title, url, age) values ('\"+title+\",\"+url+\",\"+age+\"')");
System.out.println("Connected database successfully..");
ps.executeUpdate();
但是当我运行应用程序时,我得到
java.sql.SQLException:列计数与第 1 行的值计数不匹配
我想问题可能出在id列,如何解决?