单项选择题
A.ResultSet是查询结果集对象,如果JDBC执行查询语句没有查询到数据,那么ResultSet将会是null值。B.判断ResultSet是否存在查询结果集,可以调用它的next()方法。C.如果Connection对象关闭,那么ResultSet也无法使用。D.如果一个事物没有提交,那么ResultSet中是看不到事物过程中的临时数据。
A.conn.setAutoCommit(false)B.conn.setSavepoint()C.conn.commit()D.conn.rollback()
A.JDBC提供了Statement、PreparedStatement 和CallableStatement三种方式来执行查询语句,其中Statement 用于通用查询,PreparedStatement 用于执行参数化查询,而CallableStatement则是用于存储过程B.对于PreparedStatement来说,数据库可以使用已经编译过及定义好的执行计划,由于PreparedStatement 对象已预编译过,所以其执行速度要快于Statement 对象”C.PreparedStatement中,“?”叫做占位符,一个占位符可以有一个或者多个值D.PreparedStatement可以阻止常见的SQL注入式攻击