常规查询
查询所有字段:select * from 表名;
查询指定字段:select 列1,列2,... from 表名;
使用 as 给字段起别名: select 字段 as 名字.... from 表名;
查询某个表的某个字段:select 表名.字段 .... from 表名;
可以通过 as 给表起别名: select 别名.字段 .... from 表名 as 别名;
消除重复行: distinct 字段
条件查询
㈠比较运算符:>, <, >=, <=, =, !=, <>

㈡逻辑运算符:and, or, not

㈢模糊查询:like, rlike

㈣范围查询:in,not in,between…and,not between…and

空判断

排序:order_by

聚合函数:count(), max(), min(), sum(), avg(), round()

分组:group_by, group_concat():查询内容, having

分页: limit

连接查询 :inner join, left join, right join

自关联:参考省级联动

相关文章:
-
2022-12-23
-
2022-12-23
-
2022-01-14
-
2021-04-23
-
2023-03-06
-
2022-12-23
-
2021-12-20
猜你喜欢
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2021-12-28
-
2022-12-23
-
2021-12-05
相关资源
-
下载
2022-12-18
-
下载
2022-12-29
-
下载
2022-12-22
-
下载
2021-06-05