1、PreparedStatement接口继承Statement,PreparedStatement实例包含已编译的SQL语句,所以其执行速度要快于Statement 对象。
2、PreparedStatement支持占位符,提高了安全性,它防止了sql语句的注入
3、PreparedStatement代码的可读性和可维护性较好.
实际开发中一般使用PreparedStatement




1、PreparedStatement接口继承Statement,PreparedStatement实例包含已编译的SQL语句,所以其执行速度要快于Statement 对象。
2、PreparedStatement支持占位符,提高了安全性,它防止了sql语句的注入
3、PreparedStatement代码的可读性和可维护性较好.
实际开发中一般使用PreparedStatement
本文标题:jdbc面试题
本文链接:https://www.haomeiwen.com/subject/nznyqxtx.html
网友评论