1.查询表有多少条记录select count(*) from table;2.查询表中符合条件的记录数select count(*) from table where id > 100;3.查询每个分组的记录数select name, count(*) as count from table group by name;