Creating an Updatable Result Set - Java JDBC

Java examples for JDBC:ResultSet

Description

Creating an Updatable Result Set

Demo Code

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

public class Main {
  public static void main(String[] args) throws Exception {
    Connection connection = null;

    Statement stmt = connection.createStatement(
        ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);

    ResultSet resultSet = stmt.executeQuery("SELECT col_string FROM my_table");
  }//  w  ww .  j av  a 2  s  .  c  o m
}

Related Tutorials