Which query will generate the required result?

You want to display 5 percent of the employees with the highest salaries in the EMPLOYEES table.

Which query will generate the required result?

You want to display 5 percent of the employees with the highest salaries in the EMPLOYEES table.

Which query will generate the required result?

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:



Leave a Reply 7

Your email address will not be published. Required fields are marked *


deivsto

deivsto

A is wrong, order by will show lower salary first
B is correct. order by desc and fetch first 5 % of rows
C is wrong, because in the question want first 5 % without ties
D is wrong, command syntax is [ FETCH { FIRST | NEXT } [ { rowcount | percent PERCENT } ]

Mr. T

Mr. T

C is wrong because:
1) you want first 5% without ties
2) you cannot mix keywords “ONLY” and “WITH TIES”. There is just “… ROWS ONLY” or “… ROWS WITH TIES”.

shape

shape

Hi,
I’m preparing for 1Z0-061 exam and reading this book:
“OCA Oracle Database 12c Administrator Certified Associate Study Guide Exams 1Z0-061 and 1Z0-062”.

Well, it says:
“The FETCH clause can specify the number of rows to return or a percentage of rows to
return. The FIRST and NEXT keywords can be used interchangeably and are for semantic
clarity only. Either one must be used.”

That means that the correct answer is B.
I’m confused, has anyone try it?

shape

shape

B is correct. Tested.

Tom

Tom

Even if the C could be the right answer, it has the wrong syntax. We cannot use words ONLY and WITH TIES together.

B is the only right answer.

Abhishek

Abhishek

Does any one have 1Z0-061 and 1Z0-062 dumps, i have exam this week, can you kindly mail me. [email protected]
Thanks in advance. 🙂