好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

count(1),count(*),orderby1,2,3,4区别

有图有真相 上图 1 制造NULL数据; 2 直接用列名来COUNT下看结果 3 用 1 2 3 4 5 * 来COUNT 下看下结果 发现都是一样的数据 都是等于全部函数. 4 ORDER BY 1 确实使用第一列来排序 5 ORDER BY 2 看看 结果正确 结果: count(1)=count(2)=count(3)=count(*); co

有图有真相 上图

1 制造NULL数据;

2 直接用列名来COUNT下看结果

3 用 1 2 3 4 5 * 来COUNT 下看下结果 发现都是一样的数据 都是等于全部函数.

4 ORDER BY 1 确实使用第一列来排序

5 ORDER BY 2 看看 结果正确

结果:

count(1)=count(2)=count(3)=count(*);

count(provcode) count(areacode) count(statedate) count(*);

order by 1 order by 2 oreder by 3;

order by 1=orderby provcode

附加结果:

查看更多关于count(1),count(*),orderby1,2,3,4区别的详细内容...

  阅读:42次