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
hello friends Im doing my final year engineering in B.Tech.. one of uncle said he can provide job in his company if im good in database management. but i have only basic knowledge about database, so like to join database management course in good intuition. so friends kindly help me to get good intuition because its my future.
Explain table?
What are the different types of failures that occur in Oracle database?
What is the difference between PFILE and SPFILE in Oracle?
query optmization techniques and quwry analyser+projects+ppts
What happens to the current transaction if a ddl statement is executed?
Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.
Is there an oracle sql query that aggregates multiple rows into one row?
What is the scope of a local variable?
Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.
How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?
How to best split csv strings in oracle 9i?
How to connect ms access to oracle servers?
List out the types of joins.
What is the difference between Delete, Truncate and Drop in Oracle?