已知,存在 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);
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 = "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的操作是()
- 已知,存在 QueryRunner对象 runner , SQL语句:String sql = "select * from user";下面操作中,能实现查询所有记录的选项是( ) A: Object list=runner.query(sql, new BeanHandler<User>(User.class)); B: List list=runner.query(sql, new BeanHandler<User>(User.class)); C: List<User> list=runner.query(sql, new BeanHandler<User>(User.class)); D: List<User> list=runner.query(sql, new BeanListHandler<User>(User.class));Object num =runner.delete(1, sql);
- 已知,存在 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));
- 已知,存在 QueryRunner对象 runner , SQL语句: String sql = "select * from user where id=?"; 下面操作中,能实现查询指定记录的选项是()