使用分组函数-SQL语言基础

时间:2021-04-25 19:38:19
【文件属性】:
文件名称:使用分组函数-SQL语言基础
文件大小:5.26MB
文件格式:PPT
更新时间:2021-04-25 19:38:19
SQL 基础 使用分组函数 * SELECT [column,] group_function(column) FROM table [WHERE condition] [GROUP BY column] [ORDER BY column]; * Guidelines for Using Group Functions DISTINCT makes the function consider only nonduplicate values; ALL makes it consider every value including duplicates. The default is ALL and therefore does not need to be specified. The datatypes for the arguments may be CHAR, VARCHAR2, NUMBER, or DATE where expr is listed. All group functions except COUNT(*) ignore null values. To substitute a value for null values, use the NVL function. The Oracle Server implicitly sorts the result set in ascending order when using a GROUP BY clause. To override this default ordering, DESC can be used in an ORDER BY clause. Instructor Note Stress the use of DISTINCT and group functions ignoring null values. ALL is the default and is very rarely specified.

网友评论