题目内容

已知user表中存在一个字段id。下面选项中,能够查询出id编号为u001和u002的用户的SQL语句是

A. select * from user where id = 'u001' and id = 'u002';
B. select * from user where id = 'u001' or id = 'u002';
C. select * from user where id in ('u001','u002');
D. select * from user where id ('u001','u002');

查看答案
更多问题

下面选项中,在SELECT语句的WHERE条件中代表不等于的关系运算符是

A. !=
B. >=
C. ><
D. <>

用户表user中存在一个名字字段username,现查询名字字段中包含"凤"的用户,下列SQL语句中,正确的是

A. select * from user where username = '凤';
B. select * from user where username like '%凤%';
C. select * from user where username like '_凤_';
D. select * from user where username like '凤';

下面选项中,代表匹配任意长度字符串的通配符是

A. %
B. *
C. _
D. ?

若想查询student表中name为空值的记录,则正确的SQL语句是

A. select * from student where name = null;
B. select * from student where name link null;
C. select * from student where name = 'null';
D. select * from student where name is null;

答案查题题库