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 sql entity?

735


Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

890


What are keys in sql?

721


When sql appeared?

814


Can we create a trigger on view?

664






What does bitemporal mean?

755


what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba

727


How can a pl sql block be executed?

680


What is lexical units in pl sql?

752


Can we call procedure in select statement?

732


Does sql*plus have a pl/sql engine?

753


Does a join table need a primary key?

706


Define implicit and explicit cursors.

806


What is a record in a database?

770


Is it important to partition hard disk?

739