MySQL count
在使用count进行数据统计行数时,有时候会使用count(*),有时候会使用count(1),有时候会使用count(列名),那么这些有什么不同呢
当使用列名作为参数时,count函数会自动忽略null值,而使用*或者常量时,就会包含null值
select count(*),count(1),count(source) from doc
count(*) count(1) count(source)
188 188 2
[zhhll.com.cn/2021/数据库/关系… count/](zhhll.com.cn/2021/数据库/关系… count/)