Comparison and usages among Statement, PreparedStatement, CallableStatement

InterfacesRecommended Use
Statement Use this for general-purpose access to your database. Useful when you are using static SQL statements at runtime. The Statement interface cannot accept parameters.
PreparedStatement Use this when you plan to use the SQL statements many times. The PreparedStatement interface accepts input parameters at runtime.
CallableStatement Use this when you want to access the database stored procedures. The CallableStatement interface can also accept runtime input parameters.
posted @ 2019-05-10 23:21  CodingYM  阅读(107)  评论(0编辑  收藏  举报