|
本帖最后由 skydl 于 2012-7-2 13:27 编辑
COUNT({ * | [ DISTINCT | ALL ] expr }) [ OVER (analytic_clause) ]
Link: http://docs.oracle.com/cd/E11882 ... s039.htm#SQLRF00624
If you specify expr, then COUNT returns the number of rows where expr is not null. You can count either all rows, or only distinct values of expr.
------------------------------------
count(1) 中的1仅仅是表达式并不是第一个字段的含义。1 总是不为null,所以此写发跟count(*)是一样的。 |
|