1.查询表有多少条记录
select count(*) from table;
2.查询表中符合条件的记录数
select count(*) from table where id > 100;
3.查询每个分组的记录数
select name, count(*) as count from table group by name;
1.查询表有多少条记录
select count(*) from table;
2.查询表中符合条件的记录数
select count(*) from table where id > 100;
3.查询每个分组的记录数
select name, count(*) as count from table group by name;
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。