Labour Day Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

New Release 1z0-071 Oracle PL Questions

Page: 20 / 24
Total 324 questions

Oracle Database 12c SQL Questions and Answers

Question 77

Which two statements are true about the COUNT function?

Options:

A.

It can only be used for NUMBER data types.

B.

COUNT (DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULLs in the INV_AMT column

C.

COUNT(*) returns the number of rows in a table including duplicate rows and rows containing NULLs in any column.

D.

A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clause.

E.

COUNT(inv_amt) returns the number of rows in a table including rows with NULL in the INV_AMT column.

Question 78

Examine this SQL statement:

SELECT cust_id, cus_last_name "Last Name"

FROM customers

WHERE country_id = 10

UNION

SELECT cust_id CUST_NO, cust_last_name

FROM customers

WHERE country_id = 30

Identify three ORDER BY clauses, any one of which can complete the query successfully.

Options:

A.

ORDERBY 2, 1

B.

ORDER BY "CUST_NO"

C.

ORDER BY 2,cust_id

D.

ORDER BY CUST_NO

E.

ORDER BY "Last Name"

Question 79

Which three statements about roles are true?

Options:

A.

Roles are assigned to roles using the ALTER ROLE Statement

B.

A role is a named group of related privileges that can only be assigned to a user

C.

Roles are assigned to users using the ALTER USER statement

D.

A single role can be assigned to multiple users.

E.

A single user can be assigned multiple roles

F.

Privileges are assigned to a role using the ALTER ROLE statement.

G.

Privileges are assigned to a role using the GRANT statement.

Question 80

Examine the data in the EMP table:

You execute this query:

SELECT deptno AS "Department", AVG(sal) AS AverageSalary, MAX(sal) AS "Max Salary"

FROM emp

WHERE sal >= 12000

GROUP BY "Department "

ORDER BY AverageSalary;

Why does an error occur?

Options:

A.

An alias name must not be used in an ORDER BY clause.

B.

An allas name must not contain space characters.

C.

An alias name must not be used in a GROUP BY clause.

D.

An alias name must always be specified in quotes.

Page: 20 / 24
Total 324 questions