备注

(1)insert ignore into:记录已存在,插入时忽略

(2)聚合函数:min、max、avg、sum、count

 在对数据库中的数据进行查询时,为使查询的结果有意义,和聚合函数一同查询的字段要求是group by之后的字段名。

(3)多表更新操作

1 update table1 as t1
2 inner join table2 as t2
3 on join_condition
4 set column1=value1,column2=value2
5 where update_condition
原文地址:https://www.cnblogs.com/yif930916/p/14821041.html