下面用于查询student表中id值在1,2,3范围内的记录的SQL语句是( )。
A: SELECT * FROM student WHERE id=1,2,3;
B: SELECT * FROM student WHERE (id=1,id=2,id=3);
C: SELECT * FROM student WHERE id in (1,2,3);
D: SELECT * FROM student WHERE id in 1,2,3;
A: SELECT * FROM student WHERE id=1,2,3;
B: SELECT * FROM student WHERE (id=1,id=2,id=3);
C: SELECT * FROM student WHERE id in (1,2,3);
D: SELECT * FROM student WHERE id in 1,2,3;
举一反三
- 下面选项中,查询student表中id值不在2和5之间的SQL语句是( )。 A: SELECT * FROM `student` WHERE `id`!=2,3,4,5 B: SELECT * FROM `student` WHERE `id` NOT BETWEEN 5 AND 2 C: SELECT * FROM `student` WHERE `id` NOT BETWEEN 2 AND 5 D: SELECT * FROM `student` WHERE `id` NOT IN 2,3,4,5
- 下面选项中,查询student表中id值不在2和5之间的学生的SQL语句是 A: SELECT * FROM student where id!=2,3,4,5; B: SELECT * FROM student where id not between 5 and 2; C: SELECT * FROM student where id not between 2 and 5; D: SELECT * FROM student where id not in 2,3,4,5;
- 下面选项中,查询student表中id值不在2和5之间的学生,其中正确的SQL语句是() A: SELECT * FROM student where id!=2,3,4,5; B: SELECT * FROM student where id not between 5 and 2; C: SELECT * FROM student where id not between 2 and 5; D: SELECT * FROM student where id not in 2,3,4,5;
- 下面选项中,用于查询student表中id在1~3范围内的记录的SQL语句是() A: SELECT*FROMstudentwhereid=1,2,3 B: SELECT*FROMstudentwhere(id=1,id=2,id=3) C: SELECT*FROMstudentwhereidin(1,2,3) D: SELECT*FROMstudentwhereidin1,2,3
- 删除student表中id为1的记录() A: TRUNCATE FROM student where id=1; B: DELETE student where id=1; C: DELETE FROM student where id=1; D: DELETE INTO student where id=1;