1. 首页
  2. 数据库
  3. 其它
  4. MySQL笔记之函数查询的使用

MySQL笔记之函数查询的使用

上传者: 2020-12-23 03:37:38上传 PDF文件 42.89KB 热度 19次
参考表 count()用来统计记录的条数 代码如下:mysql> select count(*) from score;mysql> select count(*) from score where stu_id=901; sum()求和函数 代码如下:mysql> select sum(grade) from score;mysql> select id,sum(grade) from score where stu_id=901; avg()求平均值函数 代码如下:mysql> select avg(grade) from score where c_name=’计算机’;mysql>
下载地址
用户评论