oracle官网下载需要账号count(1),count(*),order by 1,2,3,4区别

count(1),count(*),order by 1,2,3,4区别

 

1 制造NULL数据;

 

 

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

 

 

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

  www.2cto.com  

 

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

 

 

5 ORDER BY 2   看看 结果正确

 

 

结果:

 

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

 

count(provcode)<>count(areacode)<>count(statedateoracle账号)<>count(*);

 

order by 1<>order by 2<> oreder by 3;

 

order by 1=orderby  provcode

 

附加结果:

 

 

 

作者 ZengMuAnSha

此条目发表在oracle metalink账号分类目录,贴了, , , , , 标签。将固定链接加入收藏夹。