How do I know if database support scrollable result sets?

package org.kodejava.example.sql;

import java.sql.*;

public class SupportScrollableResultSet {
    private static final String DRIVER = "com.mysql.jdbc.Driver";
    private static final String URL = "jdbc:mysql://localhost/kodejava";
    private static final String USERNAME = "root";
    private static final String PASSWORD = "";

    public static void main(String[] args) throws Exception {
        Connection connection = null;
        try {
            connection = DriverManager.getConnection(URL, USERNAME, PASSWORD);
            DatabaseMetaData metadata = connection.getMetaData();

            boolean supportForwardOnly =
            System.out.println("supportForwardOnly = " + supportForwardOnly);

            boolean supportScrollInsensitive =
            System.out.println("supportScrollInsensitive = " + supportScrollInsensitive);

            boolean supportScrollSensitive =
            System.out.println("supportScrollSensitive = " + supportScrollSensitive);
        } catch (SQLException e) {
        } finally {
            if (connection != null) {

Wayan Saryada

Founder at Kode Java Org
I am a programmer, a runner, a recreational diver, currently live in the island of Bali, Indonesia. Mostly programming in Java, Spring Framework, Hibernate / JPA. You can support my works by donating here. Thank you 🙂.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.