步骤:
Class.forName(com.mysql.jdbc.Driver);
Connection con = DriverManager(dbUrl, dbUser, dbPassword);
String sql = ....;
Statement stmt = con.createStatement();
// 返回受影响数据的条数
int result = stmt.executeUpdate(sql);
stmt.close();
con.close();
2022-07-11 20:31:33
Class.forName(com.mysql.jdbc.Driver);
Connection con = DriverManager(dbUrl, dbUser, dbPassword);
String sql = ....;
Statement stmt = con.createStatement();
// 返回受影响数据的条数
int result = stmt.executeUpdate(sql);
stmt.close();
con.close();