Java JDBC ignores setFetchSize?

前端 未结 5 1401
余生分开走
余生分开走 2020-11-30 07:59

I\'m using the following code

 st = connection.createStatement(
            ResultSet.CONCUR_READ_ONLY,
            ResultSet.FETCH_FORWARD,
            Resu         


        
5条回答
  •  日久生厌
    2020-11-30 08:33

    I think setFetchSize(...) is in order to provide Pagenation

    But in case you just want to limit the number of rows, use this instead:

    st.setMaxRows(1000);
    

提交回复
热议问题