Wednesday 1 October 2014

Statement Vs PreparedStatement

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.



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment