删除数据表teacher中教工号(num)为1002的记录删除,使用下列哪条SQL语句( )
A: DELETE FROM teacher num=1002;
B: DELETE FROM teacher WHERE num=1002;
C: DELETE FROM teacher ,num=1002;
D: DELETE teacher where num=1002;
A: DELETE FROM teacher num=1002;
B: DELETE FROM teacher WHERE num=1002;
C: DELETE FROM teacher ,num=1002;
D: DELETE teacher where num=1002;
举一反三
- 删除表teacher(id,name,gender,birthday,score)中id为4的老师( ) A: delete from teacher; B: delete from teacher where id = 4; C: delete teacher where id = 4; D: drop from teacher where id = 4;
- 已知,存在 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);
- 下列对结构体类型变量定义不正确的是( ) A: struct teacher { int num; int age; }teach1; B: struct { int num; int age; }teach1,teach2; C: struct { int num; int age; }teacher; struct teacher teach1; D: struct teacher { int num; int age; }; struct teacher teach1;
- 删除表course的记录。其SQL语句为( )。 A: DELETE from course where * B: DELETE * from course C: DELETE course D: DELETE FROM course