@Test
  public void testExecutePreparedStatement() throws Exception {
    String key = "testKey";
    String val1 = "val1";
    String val2 = "val2";
    PreparedStatement ps = con.prepareStatement("set " + key + " = ?");

    // execute() of Prepared statement
    ps.setString(1, val1);
    ps.execute();
    verifyConfValue(con, key, val1);

    // executeUpdate() of Prepared statement
    ps.clearParameters();
    ps.setString(1, val2);
    ps.executeUpdate();
    verifyConfValue(con, key, val2);
  }
Execute non-select statements using execute() and executeUpdated() APIs
of PreparedStatement interface
@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java