OCP-1Z0-新051-61题版本-34
2013-12-29 00:06
302 查看
QUESTION NO: 34
Which two statements are true regarding the COUNT function? (Choose two.)
A. COUNT(*) returns the number of rows including duplicate rows and rows containing NULL value in any of the columns
B. COUNT(cust_id) returns the number of rows including rows with duplicate customer IDs and NULL value in the CUST_ID column
C. COUNT(DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULL values in the INV_AMT column
D. A SELECT statement using COUNT function with a DISTINCT keyword cannot have a WHERE clause
E. The COUNT function can be used only for CHAR, VARCHAR2 and NUMBER data types
Answer: A,C
答案解析:
参考:108:/article/1348572.html
Explanation:
Using the COUNT Function
The COUNT function has three formats:
COUNT(*)
COUNT(expr)
COUNT(DISTINCT expr)
COUNT(*) returns the number of rows in a table that satisfy the criteria of the SELECT statement,
including duplicate rows and rows containing null values in any of the columns. If a WHERE
clause is included in the SELECT statement, COUNT(*) returns the number of rows that satisfy the
condition in the WHERE clause.
In contrast,
COUNT(expr) returns the number of non-null values that are in the column identified by expr.
COUNT(DISTINCT expr) returns the number of unique, non-null values that are in the column
identified by expr.
Which two statements are true regarding the COUNT function? (Choose two.)
A. COUNT(*) returns the number of rows including duplicate rows and rows containing NULL value in any of the columns
B. COUNT(cust_id) returns the number of rows including rows with duplicate customer IDs and NULL value in the CUST_ID column
C. COUNT(DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULL values in the INV_AMT column
D. A SELECT statement using COUNT function with a DISTINCT keyword cannot have a WHERE clause
E. The COUNT function can be used only for CHAR, VARCHAR2 and NUMBER data types
Answer: A,C
答案解析:
参考:108:/article/1348572.html
Explanation:
Using the COUNT Function
The COUNT function has three formats:
COUNT(*)
COUNT(expr)
COUNT(DISTINCT expr)
COUNT(*) returns the number of rows in a table that satisfy the criteria of the SELECT statement,
including duplicate rows and rows containing null values in any of the columns. If a WHERE
clause is included in the SELECT statement, COUNT(*) returns the number of rows that satisfy the
condition in the WHERE clause.
In contrast,
COUNT(expr) returns the number of non-null values that are in the column identified by expr.
COUNT(DISTINCT expr) returns the number of unique, non-null values that are in the column
identified by expr.
相关文章推荐
- OCP-1Z0-新051-61题版本-33
- HBase 运维分析
- 配置Hadoop集群:java.net.NoRouteToHostException: No route to host问题的解决
- Windows操作系统初步介绍
- H.264中的I_PCM模式
- 半像素引起的那些坑
- 在线判断json格式是否正确
- OCP-1Z0-新051-61题版本-32
- OCP-1Z0-新051-61题版本-31
- OCP-1Z0-新051-61题版本-30
- OCP-1Z0-新051-61题版本-29
- 高性能网络编程6--reactor反应堆与定时器管理
- IOS app启动画面和图标设置(Iphone5 and IOS7 and Xcode5)
- OCP-1Z0-新051-61题版本-28
- OCP-1Z0-新051-61题版本-27
- OCP-1Z0-新051-61题版本-26
- OCP-1Z0-新051-61题版本-25
- eclipse如何导入sql server2005中的jar包
- 动态规划:从新手到专家
- OCP-1Z0-新051-61题版本-24