Prepared statements are compiled only once and rest of the time just datas are placed It is just same as that of writting a query in the sql plus. like insert into emp (id,name) values (?,?) evey time you will say & this same as that of prepared statement. if you have oracle then you can see. Callable statements are used to execute stored procedured
Joined: Jan 29, 2001
I've read some article on the internet that says callablestatement(stored proc) is much faster than the preparedstatement.the only problem is that using stored proc, you're tied up to a certain db.what if in the future you change db?
Joined: Nov 05, 2003
Because you know which JDBC driver you are using. According to your driver you will write sql statement in Statement, PrepareStatement & Call... etc. As of I know all database has some variation to sql & not all has store procedure like on in Oracle using PL/SQL...just a input...