What is the query to find nth highest salary?
What is the use of cursors?

Answer Posted / ram

1. nth highest salary

-> select *from emp e where &n =(select count(distinct sal)
from emp m where e.sal <= m.sal);


2. -> Cursor.

When a query is executed in oracle, a result set is
produced and stored in the memory. Oracle allows the
programmer to access this result set in the memory through
cursors.

use a cursor?

Many times, when a query returns more than one row as a
result, we might want to go through each row and process
the data in different way for them. Cursor is handy here.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between a data warehouse and a data mart?

594


Do you find any difficulty while working with flat files as source and target?

664


Hi, There is a session in my workflow which is running for a long time, atlast we found the cause is the missing index. My session is running via a stored procedure. Can I create an Index on the table which the stored procedure is using while my session is running? Please suggest. My Informatica version is PC 8.0.6 My Oracle APPS is 11.5.3. Thanks,

6745


In warehouses how many schemas are there?

576


How to create the source and target database connections in server manager?

618






What is rank transform?

595


What is the procedure for creating independent data marts from informatica 7.1?

558


Can we get 1st record through Informatica(without sequence number).

974


Explain joiner transformation in informatica

662


As union transformation gives UNION ALL output, how you will get the UNION output?

639


Explain the aggregator transformation?

622


what is unit testing?tell me proceedure

1768


where to store informatica rejected data?

672


Explain transaction control transformation in informatica

757


How does a sorter cache works?

563