The list of methods to do SQL Update are organized into topic(s).
void
execUpdateQuery(Connection C, String query) exec Update Query
Statement S;
try {
S = C.createStatement();
S.executeUpdate(query);
S.close();
catch (SQLException E) {
System.out.println("SQLException: " + E.getMessage());
...
void
ExecUpdateSql(Connection conn, String strSql) Exec Update Sql
java.sql.Statement stmt = conn.createStatement();
logger.info(strSql);
int i = stmt.executeUpdate(strSql);
logger.info("rows count={}", i);
if (conn.getAutoCommit() == false) {
conn.commit();
int
executeUpdate(Connection conn, String sql) execute Update
int num = 0;
try {
Statement stmt = conn.createStatement();
num = stmt.executeUpdate(sql);
} catch (Exception e) {
e.printStackTrace();
return num;
...
boolean
executeUpdate(Connection conn, String sql) execute Update
Statement stmt = null;
try {
stmt = conn.createStatement();
stmt.executeUpdate(sql);
} catch (Exception e) {
throw e;
} finally {
close(stmt);
...
boolean
executeUpdate(Connection conn, String sql) execute Update
System.out.println("Update SQL: " + sql);
Statement stmt = null;
try {
stmt = conn.createStatement();
stmt.executeUpdate(sql);
} catch (Exception e) {
throw e;
} finally {
...