Here you can find the source of execte(Connection conn, String sql)
Parameter | Description |
---|---|
SQLException | an exception |
public static void execte(Connection conn, String sql) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; public class Main { /**//from w w w .ja va2 s . c o m * @throws SQLException * */ public static void execte(Connection conn, String sql) throws SQLException { Statement stat = conn.createStatement(); stat.execute(sql); stat.close(); } }