write a procedure to find top second no from a list of
numbers

Answer Posted / roshan

create or replace procedure pr_getmax(enter_number in
number,sal out number)
as
begin
select salary into sal from
(select rownum rn,salary
from
(select
a.salary
from
employees a
order by a.salary desc) )a
where
a.rn = enter_number;
end;

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are string functions in sql?

678


How do you sort in sql?

608


What is a ddl command?

542


1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...

1917


How do you exit in sql?

594






Can we insert in sql function?

551


Is there a way to automate sql execution from the command-line, batch job or shell script?

557


What is sql basics?

586


Is inner join same as self join?

586


What is full form of rtm?

535


What are synonyms in sql?

536


What are sql queries used for?

538


What is data control language (dcl)?

601


what is the command line end user interface - mysql? : Sql dba

505


What is example of database?

519