GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 147 of 156    Print  
Return Multiple Rows
How to return more than one row through functions? Explain with example.


  
Total Answers and Comments: 3 Last Update: November 01, 2008     Asked by: ramesh.akula9 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 29, 2008 06:18:44   #1  
patilpravin_1981 Member Since: December 2007   Contribution: 29    

RE: Return Multiple Rows

select * from GetEmployees() where id > 2;


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
September 01, 2008 04:47:15   #2  
raghuprasad Member Since: August 2007   Contribution: 23    

RE: Return Multiple Rows

Eg: SELECT empname,sal 
       FROM    employee_table
       WHERE sal<MAX(sal) AND sal>MIN(sal);

Hope the above statement executes.


 
Is this answer useful? Yes | No
October 31, 2008 05:52:09   #3  
rajivgupta780184 Member Since: August 2008   Contribution: 29    

RE: Return Multiple Rows

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 PVT LTD.



 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape