wangshuazi

数据库count用法

1.查询表有多少条记录
select count(*) from table;

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

3.查询每个分组的记录数
select name, count(*) as count from table group by name;

分类:

技术点:

相关文章:

  • 2021-07-07
  • 2022-12-23
  • 2021-12-23
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2021-04-07
猜你喜欢
  • 2021-12-01
  • 2021-11-12
  • 2021-12-23
  • 2022-01-12
  • 2021-12-29
  • 2022-01-27
相关资源
相似解决方案