A developer needs to insert multiple rows into a database efficiently. Which statement type and technique should they use?
- Batch processing using PreparedStatement
- Individual inserts using Statement
- Stored Procedure with Cursor
- Trigger for each row
Batch processing using a PreparedStatement is an efficient way to insert multiple rows into a database as it reduces the number of database round-trips. It allows the developer to group multiple SQL statements and execute them as a batch.
Loading...
Related Quiz
- What must be done to ensure the safe and correct download of files with different character encodings?
- To apply multiple filters to a single resource, the web.xml file must define a __________ for each filter.
- What is the first method called when a filter is instantiated by the servlet container?
- In a CallableStatement, the method _________ is used to execute a SQL function.
- How does a distributed cache enhance the scalability of a web application?