![]() Related Questions Latest Answer : Yes you can pass the whole select statement of the cursor dynamicaly, see ref_cursors.There is also a system package sys.dbms_sql which allows everything to make dynamically. ... Read Answers (5) | Asked by : sweety How to return multiple records from procedure?e. g. I fired a select query and I want to retun a result to ? Hi,We have to select some rows from a table using many conditions in the where clause. Then we have to write those selected rows to one flat file. I know that we can use UTL_FILE package to do this. Is there any better approach to do this?? Read Answers (5) | Asked by : Ritesh Hi 1.What is difference between procedure and function?1. procedure may or may not return values whereas function must return value2. we can call the function in the sql statements whereas we can't call the procedureExcept these two, is there any difference between these two.2. What is pl/sql table and what is use of it. In which case, we can use it3. What is ref cursor, what is the use of it.4.how the function will return multiple values. Pls give me with examples Latest Answer : A nested loop is a loop within a lop, an inner loop within the body of an outer one. How this workds is that the first pass of the outer loop triggers the innter which executes to completion. Then the second pass of the outer loop triggers the loop again. ... Read Answers (1) | Asked by : SAGAR Hi,1. Iam looking for sample program for ref cursor. ref cursor can be associated with many select statements and we can use the ref cursor to return the multiple value from the procedure or function. Latest Answer : Hi,Let me answer your second questin first. Why ref cursor instead of %ROWTYPE.%ROWTYPE is used for fetches record/row of a single table.OR in case of columns of different tables then you have to create a RECORD and then used %ROWTYPE.But ... How to write a query or procedure or function to retrieve all the tables from database where the table dont have any data (no rows). Database has 100 tables and some of the tables dont have any data. I want to pullout those table names from database in Oracle. Read Answers (3) | Asked by : Robert Latest Answer : Declare the collection variable (varrys or PL/SQL tables)Â as out parameter for the procedure and fetch the result set into collection variable. ... How to return more than one row through functions? Explain with example. Latest Answer : create or replace function f1 return sys_refcursor as
r1 sys_refcursor;
begin open r1 for select * from emp;
return(r1);
end;
call the function as: select f1 from dual;
Thanks & Regards
RAJIV GUPTA (ORACLE CONSULTANT)
YOGIK TECHNOLOGIES ... How can we handle multiple rows without using loops in PL SQL? Latest Answer : This can be done by a function called TABLE FUNCTION by means of this you can return more number of rows and columns this is more effective than using ref cursorregards sen-prakash ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||