Java SQL Update executeUpdate(Connection conn, String sql)

Here you can find the source of executeUpdate(Connection conn, String sql)

Description

execute Update

License

Open Source License

Declaration

public static int executeUpdate(Connection conn, String sql) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.Connection;

import java.sql.Statement;

public class Main {
    public static int executeUpdate(Connection conn, String sql) {
        int num = 0;
        try {/* ww  w .  j  a  v  a2 s. c  om*/
            Statement stmt = conn.createStatement();
            num = stmt.executeUpdate(sql);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return num;
    }
}

Related

  1. execUpdateQuery(Connection C, String query)
  2. ExecUpdateSql(Connection conn, String strSql)
  3. executeUpdate(Connection conn, String sql)
  4. executeUpdate(Connection conn, String sql)
  5. executeUpdate(Connection conn, String sql)
  6. executeUpdate(Connection conn, String sql, Object... parameters)
  7. executeUpdate(Connection connection, String query)