How to return more than one value from a function?

Answer Posted / siva

Create or replace procedure proc(n number,s out sys_refcursor)
is
Begin
open s for select ename from emp where deptno=n;
end:

Var c ref_cursor;
exec proc(10,:c);
print : c;
Clark
King
Miller

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between functions, procedures, and packages in pl/sql?

482


what are the type of locks ? : Sql dba

529


Why indexing is needed?

519


What are different joins used in sql?

555


Can we debug stored procedure?

525






What is the need of a partition key?

535


What is localdb mssqllocaldb?

622


How do I audit the sql sent to the server?

526


Explain clause in sql?

564


How do you concatenate in sql?

552


What is the use of primary key?

537


When can we use the where clause and the having clause?

578


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

513


what are local and global variables and their differences? : Sql dba

541


What is compound trigger?

560