a.
Statement object executes SQL statement without parameters, where as
PreparedStatement object executes SQL statement with parameters also.
b.
If you are going to execute same SQL statement multiple times, then
PreparedStatement object works faster than Statement object.
c.
Statement prepares and executes the query plan every time, where as
PreparedStatement prepares the query plan once and reuses the same
plan.
Note:
Query plan is the set of steps,
how to execute a query.
No comments:
Post a Comment