Java SQL Execute executeInsertSQL(String sql)

Here you can find the source of executeInsertSQL(String sql)

Description

execute Insert SQL

License

BSD License

Declaration

private static int executeInsertSQL(String sql) throws SQLException 

Method Source Code

//package com.java2s;
/*L//ww w  .ja  v a 2  s.  c  om
 * Copyright Georgetown University, Washington University.
 *
 * Distributed under the OSI-approved BSD 3-Clause License.
 * See http://ncip.github.com/cab2b/LICENSE.txt for details.
 */

import java.sql.SQLException;
import java.sql.Statement;

public class Main {
    private static Statement stmt = null;

    private static int executeInsertSQL(String sql) throws SQLException {
        int b;
        System.out.println(sql + ";");
        b = stmt.executeUpdate(sql);
        return b;
    }
}

Related

  1. executeDDL(final Connection connection, final String sql, final int... ignoreErrors)
  2. executeDDL(String ddl)
  3. executeImmediate(String sql)
  4. executeInsert(Connection conn, String sql, boolean hasAutoGeneratedKey, Object... parameters)
  5. executeInsert(Connection conn, String targetTable, String destinationTable)
  6. executeQueries(Connection conn, InputStream stream)
  7. executeResource(Connection con, String resource)
  8. executeSetArgs(PreparedStatement stmt, Object... args)
  9. executeShutDownForHSQL(java.sql.Connection connection)