2019-08-24mysql基础总结

小结:

1、查找mysql设置参数:

show variables like 'sql_safe_updates';

2、having 是针对结果集,而where是在磁盘里查找,应该是现有where查找 才有having在内存中操作;

3、count(0),count(1),count(*)结果都一样,count(列)排除null,有时候将列数据转化为0或1,通过sum来统计,而不用count,参考求平均成绩

4、子查询顺序:where  group by  having  order by  limit

5、

猜你喜欢

转载自www.cnblogs.com/maidongdong/p/11404698.html