mysql

来源:互联网 发布:网络与手机失泄密 编辑:程序博客网 时间:2024/04/19 20:46
  • 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,’)’)
0 0
原创粉丝点击