在Mysql数据库中,以下哪条语句用于统计test表中的记录总数?()
A: select sum(*) from test;
B: select max(*) from test;
C: select avg(*) from test;
D: select count(*) from test;
A: select sum(*) from test;
B: select max(*) from test;
C: select avg(*) from test;
D: select count(*) from test;
举一反三
- 获取test表中的数据,进行分页(每页显示10条数据),根据上述条件,获取第2页数据的SQL语句是( )。 A: Select * from test limit 10,10 B: Select * from test limit 11,10 C: Select * from test limit 10,20 D: Select * from test limit 11,20
- 统计学生成绩中的最高分,下列语句正确的是 A: SELECT AVG(grade) FROM student; B: SELECT (SUM(grade) / Count(id)) FROM student; C: SELECT MAX(grade) FROM student; D: SELECT MIN(grade) FROM student;
- 查询scott用户的emp表中的总记录数,可以使用下列哪个语句?() A: SELECT MAX(empno) FROM scott.emp; B: SELECT<br/>COUNT(empno) FROM scott.emp; C: SELECT COUNT(comm) FROM scott.emp; D: SELECT COUNT(*) FROM scott.emp;
- 统计每个部门中人数的语句是? A: select count(id) from emp order by deptno; B: select sum(id) from emp order by deptno; C: select count(id) from emp group by deptno; D: select sum(id) from emp group by deptno;
- 删除test表中所有数据的语句为 A: drop table test; B: delete table test; C: delete from test; D: truncate test;