Are prepared statements actually compiled?

- Yes, they compiled
- No, they are bound by the JDBC driver

CORRECT ANSWER : Yes, they compiled

Discussion Board
Prepared Statements compiled

PreparedStatement object are used for sending SQL statements to the database. It is a special type of statement derived from the more general class, Statement. If any execution of Statement object needs to be done many times then the PreparedStatement object reduces the time considerably. PreparedStatement uses SQL statements to send the data to DBMS right away after being compiled. It just not contain SQL statement, but a SQL statement that has been precompiled. This means that when the PreparedStatement is executed, the DBMS can just run the PreparedStatement SQL statement without having to compile it first.

Rohit Sharma 09-21-2014 09:19 AM

Write your comments


Enter the code shown above:
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)