在数据库中怎样运用count 语句?急求准确答案!

如题所述

第1个回答  推荐于2018-05-07
1.查询表有多少条记录
select count(*) from table;

2.查询表中符合条件的记录数
select count(*) from table where id > 100;

3.查询每个分组的记录数
select name, count(*) as count from table group by name;本回答被提问者和网友采纳
相似回答