Difference between Prepared statement and Statement?

Showing Answers 1 - 7 of 7 Answers

padma

  • Oct 27th, 2005
 

           1) PREPARED statements r already pre-compiled whereas for STATEMENT, each and every statement has to be compiled all the time..

           2)  If u want to execute a single SQL statement multiple number of times, then go for PREPARED statement or else v can use STATEMENT.

          

          

              

  Was this answer useful?  Yes

Rajasekar

  • Nov 21st, 2006
 

Statement

Fixed parameter value

Execute every time

Prepared Statement

Can supply parameter value at execution time

Execute once for ?n? parameter value

Callable Statement

To execute stored procedure like pl/sql

  Was this answer useful?  Yes

PreparedStatement provides facility of parameterized queries while Statement does not.


P.S is pre-compiled while Statement is not hence Statement is compiled everytime for each query request.


Statement is fast then P.S 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions