What is the difference between PreparedStatement and Statement in java? Anupam Mishra133103-Nov-2015javajava j2ee Updated on 17-Sep-2020
Anupam Mishra
03-Nov-2015There are four steps for the execution of query:
1. Query is parsed
2.Query is compiled.
3. Query is optimized.
4. Query is executed.
In case of statement, the above four steps are performed every time. And in case of prepared statement the above three steps are performed once.