private static void executeSqlScript ( Connection connection , URL scriptUrl ) throws SQLException { for ( String sqlStatement : readSqlStatements ( scriptUrl ) ) { if ( ! sqlStatement . trim ( ) . isEmpty ( ) ) { connection . prepareStatement ( sqlStatement ) . executeUpdate ( ) ; } } }
Executes SQL script .