(1), the difference between count (*), count count (column name) of

count (*) and count (1) without any difference, always superior to count other fields
as long as there is the general index, count it will use general index,
when there is only a primary key, count (*) and or ount (1) will use the primary key index

count(a)

(1) When a = null, count (null)

(2) .a = *, or 1:00, count (*) is the number of rows in the table (including the row where the null)

The number of rows (3) .a = column name, such as when the name, (name) count the number of rows in the table wei subtracting the null

Guess you like

Origin www.cnblogs.com/hdc520/p/11414786.html