What is the difference between Statement, PreparedStatement and CallableStatement. Plz give me the code. Thank U.

Questions by questioninterest

Showing Answers 1 - 3 of 3 Answers

sekhar

  • Nov 14th, 2006
 

Statement: Used for SingleSql statement.If u want retrive singlesql statment use statement.

PreparedStatment:These are precompiled statement,once u compiled need to compile every time.

preparedStatement psmt=con.prepareStatement("Insert into emp(empno,empname,sal) values(?,?,?);

CallableStatement:To call stored procedure inthe database engine

CallbleStatement cs=con.prepareCall("<calll Storedprocedure"?

  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