The PreparedStatement
The PreparedStatement provides a certain degree of convenience for the Java database developer. Once a SQL statement has been prepared, its object representation becomes the PreparedStatement object. The parameters of the query can be changed not by restating the query, but by making method calls on the PreparedStatement object.
If the full range of queries to be presented to an application are known when the application is being developed, and the range of queries is limited and manageable, then it may make very good sense to use the PreparedStatement class to develop the application.
If all of the queries an application may need to run are known beforehand and the number of queries is limited, then it probably makes sense ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access