package util.sqlparse.visitor.dm.test;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;

public class TestJdbc {
   public static void main(String[] args) throws InterruptedException, SQLException, ClassNotFoundException {
      Connection connection = connection();
      test2(connection);
   }

   private static void test2(Connection connection) throws ClassNotFoundException, SQLException {
      Statement statement = connection.createStatement();
      PreparedStatement prestmt = connection.prepareStatement("SELECT * FROM ( select ROWNUM RN ,TT.* FROM  (SELECT * FROM \"test1\".\"TABLE_5\" ) TT ) where RN> ? AND RN <= ? ");
      prestmt.setInt(1, 1);
      prestmt.setInt(2, 200);
      prestmt.executeQuery();
   }

   private static Connection connection() throws SQLException, ClassNotFoundException {
      String url = "jdbc:dm://192.168.2.228:5236:ry?loginEncrypt=false";
      Connection connection = DriverManager.getConnection(url, "SYSDBA", "123123123");
      return connection;
   }
}
