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 @   wyuioahxvm  阅读(119)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示