count(*),count(1),count(column)

已知table表的行数是6;

1.select count(*) from table;

    

    返回的是table表的行数

2.select count(1) from table;

    

    返回的是table表的行数

3.select count(column) from table;

    

    count其中的一列,返回的是table表的行数

   在性能上 count(*) = count(1) >count(column)

 

posted @ 2019-08-15 10:43  wyuioahxvm  阅读(117)  评论(0编辑  收藏  举报