answersLogoWhite

0

* Prepared Statement is Pre-compiled class , but Statement is not. * So in PreparedStatement the execution will be faster. Actually when u submit a simple statement to the databse, at first the DBMS parses it and sends it back with the result, so again when u send the same statement again the DBMS server parses it and sends back the result so here a lot of time is wasted and because the statement is again parsed though it has been sent twice or thrice it consumes a lot of time and response will be slow.Prepared Statement is used when u want to execute a statement object many times. when u submit a PreparedStatement the DBMS server parses it and creates a execution plan. This e-plan can be used when u again send the same statement to the database.That is the DBMS server zest executes the compiled statement rather that executing it from first, hence we get an precompiled statement.And also the advanatge of using this PreparedStatement is it is used to send dynamic sql statements, which u can give values later than giving the values at the time of creation.

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What kind of statement is precompiled and stored in a PreparedStatement object?

A programming statement is precompiled and stored in a PreparedStatement object. It is usually a statement that is repeated and executed many times throughout the program.


What is difference between basic command and statement?

difference between command and statement


What is the difference between bar scale and statement scale?

What is the difference between a bar scale and a statement scale


What are the difference between command and statement?

i am starving


What is the difference gwbasic commands and statements?

difference between command and statement


Difference between scope statement and project charter?

The difference between a scope statement and a project charter is that a project charter acknowledges the projects existence and the scope statement defines the project objectives.


What is the difference between 'switch' statement and 'if' statement?

we can use switch statement in multiple time but in if statement we can not use multiple time


What is the difference between a declarative statement and an imperative statement?

In a declarative statement, you initialize the object. But in an imperative statement, you use a preexisting statement and use it.


What is the difference between a fact and a statement?

The difference between fact and statement is that a fact is something that is empirically true and can be supported by evidence while a statement is a belief that may or may not be backed up with some type of evidence.


What is difference between control statements and looping statements in c language?

differance between control statement and looping statement?


What is the difference between policy and policy statement?

Policy statement is what you say you are going to do. Policy is what you do, which should be in line with the policy statement.


What is the difference between a problem statement and a mission statement?

Perhaps the difference lies in the distinct meaning or the words in question. For the problem statement, state the problem. For the mission statement, state your mission, or how you will address the problem.