1、JDBC中Statement接口和PrepareStatement接口关系与区别
Statement接口不能使用占位符?,需要拼sql,所以没有setInt,setString等方法;Preparement接口继承了Statement接口,不需要拼sql,可以使用占位符,所以有setInt,setString等方法;
Preparement是预编译的,编译一次,sql不改变的话,后面执行就不需要编译了,效率高;
可以防止sql注入攻击。