OCP 1z0-071 79 title (first edition)

OCP 1z0-071 79 title (first edition)

SQL Database 12c the Oracle
Version 2.0
Date: 2019/6/16

QUESTION 79
Which three statements are true regarding the SQL WHERE and HAVING clauses?
A. The HAVING clause conditions can have aggregating functions.
B. The HAVING clause conditions can use aliases for the columns.
C. The WHERE and HAVING clauses cannot be used together in a SQL statement.
D. The WHERE clause is used to exclude rows before grouping data.
E. The HAVING clause is used to exclude one or more aggregated results after grouping data.

Correct Answer: ADE

. Aggregating: v aggregate; total (aggregate present participle)

aliases:. n alias (Alias ​​complex)

exclude: vt excluded; rejection; rejected; eviction.

Translation:
question 79
on WHERE and HAVING clause, which three statements is correct?
A.HAVING clause condition can use aggregate functions.
B.HAVING condition clause can use aliases column.
C.WHERE and HAVING clause can not be used in SQL statements.
D.WHERE clause rows before the data packet is excluded.
E.HAVING clause exclude one or more data packet after polymerization results.

The correct answer: ADE

Answer Analysis:

Aggregation function: aggregation function is based on multi-line data return line results, such as: AVG, COUNT, MAX, MIN like. (Refer to: https://blog.csdn.net/ceclar123/article/details/12394967)

A: correctly, for example: select deptno from emp group by deptno having min (sal)> 5000; query phrase is meant to find out the smallest sector the wage (SAL) from greater than 5000 employees (EMP) table, the display sector number (deptno)

B: error. This order of execution in Oracle SQL statements related to each clause, in short, from> where> group by> having > select> order by, a column alias is defined in the select clause, having clause is executed in select sub the preceding sentence, if the column alias in having, of course, is not recognized. (Refer to: https://www.cnblogs.com/godtrue/p/3791591.html )

Column aliases can be used as defined in the Oracle database and table alias can not. (Refer to: https://www.cnblogs.com/fengzhentian/p/4563938.html)

C: error.

D: correct. This order of execution in Oracle SQL statements related to each clause.

E: correct.

Guess you like

Origin blog.csdn.net/qq_40133329/article/details/92396218