执行executeUpdate();却没有写数据库的原因:没有提交 执行executeUpdate();却没有写数据库的原因:没有提交解决办法 1 conn.commit(); 2,在前面写上 conn.setAutoCommit(true);