打印本文 打印本文 关闭窗口 关闭窗口
SQLPlus命令使用指南(三)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数4451  更新时间:2007/11/14 11:03:32  文章录入:mintao  责任编辑:mintao
COMPUTE function LABEL label_name OF column column column

... ON break_column

COMPUTE执行的计算操作主要有:

SUM

Computes the sum of the values in the column.

MINIMUM

Computes the minimum value in the column.

MAXIMUM

Computes the maximum value in the column.

AVG

Computes the average of the values in the column.

STD

Computes the standard deviation of the values in the column.

VARIANCE

Computes the variance of the values in the column.

COUNT

Computes the number of non-null values in the column.

NUMBER

Computes the number of rows in the column.

下面是一个COMPUTE计算的例子。如图6

6

COMPUTE参数的说明

¨             LABEL为计算指定一个名称。如COMPUTE SUM LABEL ‘TOTAL’ OF SAL ON JOB,那么在小计这一行,会显示TOTAL,而不是缺省的sum

不需要打印任何标签,就使用DUMMY。如图7

上一页  [1] [2] [3] [4] [5]  下一页

打印本文 打印本文 关闭窗口 关闭窗口