mysql操作命令

2018-04-01  本文已影响0人  小胖写日记

查询的基本语法

select * from 表名;

条件查询

select * from 表名 where 条件;

条件查询

(查询)聚合

select 聚合函数(字段名) from students;                  聚合函数:sum求和   min最小值  max最大值   count总数   avg平均值

聚合

(查询)排序

select * from 表名  order by 列1 asc|desc,列2 asc|desc,...       asc升序    desc降序

降序 升序
上一篇 下一篇

猜你喜欢

热点阅读