- as不是给表里的字段取别名,而是给查询的结果字段取别名。其目的是让查询的结果展现更符合人们观看习惯,在多张表查询的时候可以直接的区别多张表的同名的字段。
- where 行级过滤 group by分组说明(仅在按组计算聚集时使用) having组级过滤
- a left join b 等价于 b right join a
- if you use an aggregate function or GROUP BY clause, the only things that can appear in
your SELECT clause are the aggregate function(s) and the columns named in the GROUP
BY clause.Also, if you want to use a column in a GROUP BY clause, it must be listed in the
SELECT clause. - Note that the HAVING clause applies to the groups
- Note that row numbers are zero indexed; that is, the first row
in the output is row number zero. - Concat()连接多个字段,select Concat(name,’(‘,num,’)’)
mysql
最新推荐文章于 2024-07-22 17:39:53 发布