已知,存在 QueryRunner对象 runner ,SQL语句: String sql = "delete from user where id=?"; 下面操作中,能实现删除记录id=1的操作是()
举一反三
- 已知,存在 QueryRunner对象 runner , SQL语句: String sql = "select * from user where id=?"; 下面操作中,能实现查询指定记录的选项是()
- 已知,存在 QueryRunner对象 runner ,SQL语句: String sql = "delete from user where id=?"; 下面操作中,能实现删除记录id=1的操作是() A: int num =runner.delete(sql, 1); B: int num =runner.update(sql, 1); C: Object num =runner.delete(1, sql); D: Object num =runner.update(1, sql);
- 已知,存在 QueryRunner对象 runner ,SQL语句:String sql = "delete from user where id=?";下面操作中,能实现删除记录id=1的操作是( ) A: Object num =runner.update(1, sql); B: Object num =runner.delete(1, sql); C: int num =runner.delete(sql, 1); D: int num =runner.update(sql, 1);
- 已知,存在 QueryRunner对象 runner , SQL语句: String sql = "select * from user where id=?"; 下面操作中,能实现查询指定记录的选项是() A: User user=(User)runner.query(sql, new BeanListHandler(User.class), new Object[]{id}); B: User user=(User)runner.query(sql, new BeanHandler(User.class)); C: User user=(User)runner.query(sql, new BeanListHandler(User.class), id); D: User user=(User)runner.query(sql, new BeanHandler(User.class), new Object[]{id});
- 已知,存在 QueryRunner对象 runner , SQL语句:String sql = "select * from user";下面操作中,能实现查询所有记录的选项是() A: List<;User>; list=runner.query(sql, newBeanHandler<;User>;(User.class)); B: List<;User>; list=runner.query(sql, new BeanListHandler<;User>;(User.class));Object num =runner.delete(1, sql); C: Object list=runner.query(sql, new BeanHandler<;User>;(User.class)); D: List list=runner.query(sql, new BeanHandler<;User>;(User.class));