Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
It is best to use PreparedStatement if you are not using any ORM.
1) It's safe as it eliminates the possibility of SQL injection
2) It's type-safe - the java-way.
3) It's fast, in some types of jdbc drivers they are compiled into stored procedures on the database side (for example, in sybase / mssql and oracle) or into pseudocode on the java side, and they are also cached.
Use it wherever you can PreparedStatement - javarevisited.blogspot.ru/2012/08/top-10-jdbc-best...
and javarevisited.blogspot.ru/2012/03/why-use-prepared...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question