where、 group by、 having 、count、limit、 order by 执行顺序

count(*) 会对记录列名为空时也进行统计,count(列名) 不会对记录的列名为空时进行统计,(进行不进行统计的意思是算不算在内,如果该列名的所有记录都是空的话,count(*)等于记录数,count(列名)是0)

from 、join 、where 、group by 、count、having、order by 、limit

猜你喜欢

转载自blog.csdn.net/u013452335/article/details/87634081