8.3.2 addBatch(String sql)
- Organization of this subsection
(1) Function
This method adds SQL statements to the Statement object's batch. You can add a maximum of 2,147,483,647 SQL statements.
(2) Format
public synchronized void addBatch(String sql) throws SQLException
(3) Arguments
- String sql
-
Specifies the SQL statements to be added.
(4) Return value
None.
(5) Exceptions
The JDBC driver throws an SQLException in the following cases:
-
The Statement object is closed.
-
The Connection object that created the Statement object is closed.
-
An attempt was made to add more than 2,147,483,647 SQL statements.
-
null or a character string with a length of zero is specified as the SQL statements.
-
A specified SQL statement exceeds 16,000,000 characters.