Home  >  Article  >  Database  >  What are the setFetchSize() and setMaxRows() methods of the JDBC statement interface used for?

What are the setFetchSize() and setMaxRows() methods of the JDBC statement interface used for?

WBOY
WBOYforward
2023-09-14 10:57:06857browse

JDBC 语句接口的 setFetchSize() 和 setMaxRows() 方法有什么用?

setFetchSize(int) Method defines the number of rows that will be read from the database when the ResultSet requires more rows. setFetchSize(int) affects how the database returns ResultSet data.

The setMaxRows(int) method of ResultSet specifies how many rows ResultSet can contain at one time. setMaxRows(int) affects client JDBC objects.

The above is the detailed content of What are the setFetchSize() and setMaxRows() methods of the JDBC statement interface used for?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete