OCP 11g考试题库详解:1Z0-051-108题
最新学讯:近期OCP认证正在报名中,因考试人员较多请尽快报名获取最近考试时间,报名费用请联系在线老师,甲骨文官方认证,报名从速!
我要咨询OCP 11g考试题库详解:1Z0-051-108题,完整题库请点击这里联系老师咨询了解
108. Which two statements are true regarding the COUNT function? (Choose two.)
A. The COUNT function can be used only for CHAR, VARCHAR2, and NUMBER data types.
B. COUNT(*) returns the number of rows including duplicate rows and rows containing NULL value in
any of the columns.
C. COUNT(cust_id) returns the number of rows including rows with duplicate customer IDs and NULL
value in the CUST_ID column.
D. COUNT(DISTINCT inv_amt)returns the number of rows excluding排除在外 rows containing duplicates and
NULL values in the INV_AMT column.
E. A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clause.
Answer: BD
试题解析:
COUNT函数有以下三种格式:
COUNT(*)
COUNT(expr)
COUNT(DISTINCT expr)
COUNT(*)用于返回表中符合SELECT语句标准的行数,包括重复行和在任何列中含有空值的行。
如果SELECT语句中包含WHERE子句,则COUNT(*)会返回符合WHERE子句中条件的行数。
相反,COUNT(expr)返回由expr标识的列中非空值的数量。
COUNT(DISTINCT expr)返回由expr标识的列中不同非空值的数量。