假定用户表user有多列,其中字段id中没有null值,字段username中存在null值。下面选项中,不能获得user表的总记录数的SQL语句是( )
A: select count(*) from user;
B: select count(id) from user;
C: select count(username) from user;
D: select count(id) from user where1=1;
A: select count(*) from user;
B: select count(id) from user;
C: select count(username) from user;
D: select count(id) from user where1=1;
举一反三
- 已知用户表 user 有多列,其中字段 id 没有 NULL 值,字段username有NULL值,选项中,不能获得 user 表的总记录数量的 SQL 语句是 A: SELECT COUNT (*) FROM user ; B: SELECT COUNT ( id ) FROM user ; C: SELECT COUNT ( username ) FROM user ; D: SELECT COUNT ( id ) FROM user WHERE 1=1;
- 假定用户表user有多列,其中字段id中没有null值,字段username中存在null值。下面选项中,不能获得user表的总记录数的SQL语句是
- 用户表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 '凤';
- 【多选题】已知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
- 以下可以正确运行的查询语句有( ) A: select * from user ; B: select * from user where username =’李四’; C: select * from user where 1=1; D: select distinct * from user;