Answer Posted / ramesh mopuri
okay above queries are fine
but in a table there are 99 salaries, so i want to pick the
50th highest salary is it possible to wright the query same
above for the get 50th high salary. absolutely not. see my
query for the get Nth salary in a table.
Select ename,sal,deptno from emp a
where &n=
(select count(distinct(sal))from emp b
where a.sal<=b.sal)
order by deptno;
after enter this query the system ask N value and give 50
the result will be shown 50th highest salary. Please reply
me whether its working or not.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is oracle used for?
What is tns service name?
Is oracle a relational database?
what happened to the global index when I truncate the data in one of the partition?
What is raw datatype?
What are the built-in functions used for sending Parameters to forms ?
Explain about integrity constraint?
What happens if you use a wrong connect identifier?
How to work with data objects interactively?
What are internal user account in oracle?
What is a dynamic performance view in oracle?
Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?
Use of an integrity constraint is better to validate data. Explain
Explain rename?
How to insert a record into a table?