A. select last_name, salary from employees
fetch first 3 rows only
order by salary;
- results in an error
---------------------------------------------
B. select last_name, salary from ( select * from employees order by salary)
where rownum <= 3;
- works
-------------------------------------------------------
c. select last_name, salary from employees
order by salary
fetch first 3 rows only ;
- works
----------------------------------------------------------------
D. select last_name, salary from employees where rownum <= 3 order by salary;
- returns the first 3 rows and orders the 3 rows based on salary so its incorrect
-------------------------------------------------------
E. select last_name, salary from employees where rownum <= 3 order by (select salary from employees);
- subquery returns more than one row so results in error
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
kesammy9
Highly Voted 1 year, 5 months agoyanoolthecool
7 months, 1 week agoninjax_m
Most Recent 1 year, 6 months agojfc1
1 year, 6 months ago