Java examples for java.sql:Statement
Execute SQL via Statement
//package com.java2s; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class Main { public static ResultSet execSQL(Statement stat, String sql) throws SQLException { ResultSet rs = null;//from www . ja va 2 s . co m //System.out.println(sql); if (stat.execute(sql)) { rs = stat.getResultSet(); } return rs; } }