GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 42 of 166    Print  
how to return multiple records from procedure?
e. g. I fired a select query and I want to retun a result to ?

  
Total Answers and Comments: 2 Last Update: October 15, 2007     Asked by: mkatpatal 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 09, 2006 12:37:41   #1  
Rama Krishna,TCS        

RE: how to return multiple records from procedure?

Hi Mukund!!

You have to return the selected cursor as OUT parameter and again you have to fetch the data from that OUT cursor..

Thanks&Regds

Ramki


 
Is this answer useful? Yes | No
October 15, 2007 02:13:34   #2  
manish dudhe        

RE: how to return multiple records from procedure?
Hi

User Ref cursor as out parameter in proc


and execute as below

sql>var s refcursor

sql>exec demo_proc('manish' :s);

sql>print s

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : 1)Using DBMS_JOB package,we can schedule the job.There are number of built-in functions in that package to schedule a job.Ex:DBMS_JOB .SUBMITDBMS_JOB .RUN.2) Using DBMS_SCHEDULERTHIS I SYNTAX FOR CREATING JOBdbms_scheduler.create_job(ob_name             ...
Read Answers (6) | Asked by : kishorebabu

Latest Answer : May be it is better to trace a select statment with on logon trigger.like:CREATE OR REPLACE TRIGGER SYS.ON_LOGON_ALL AFTER LOGON ON DATABASE WHEN (USER = 'MAX') BEGIN EXECUTE IMMEDIATE 'ALTER SESSION SET SQL_TRACE=TRUE'; --EXECUTE IMMEDIATE ...
Read Answers (9) | Asked by : SumanNaidu.S

What is cursor? Explain the types of cursor and write one implicit cursor program to check how many records deleted from table?
Read Answers (6) | Asked by : indranil

Hi, in Cursors this is the Scenario.if i am manipulating the data of a table which has 10 records,i need to go to the 5th record.how is it possible?What is the Exact usage of Ref Cursor?
Read Answers (1) | Asked by : murthy

How to query to know, that dbms_rowid package contains ROWID_OBJECT, rowid_block_number ,etc procedures or functions in it.

Can we call a procedure into another procedure?If yes means how you can pass the perameters for the two procedures?

How do you get the return values in pl/sql when u exec them be sides assigning the values to Bind variables
Read Answers (1) | Asked by : srini

Hello,I need some info, that is it possible to find or make query ,that if we know the data stored in a table but don't know the field name in which the required data is stored.ExampleTable having fields like columnA, columnB, columnC, columnD,..........columnN and all have the same dataType. and you dont know in which field your data exists.suppose some data like e.g. "BackMan" exists in any Field of the table but we don't know in which Field this information is store.Is it

When we need to use USING clause in the sql?For example in this below:SELECT emp_name, department_name, city FROM employees e JOIN departments d USING (department_id) JOIN locations l USING (location_id) WHERE salary > 10000; Can anyone explain what is mean of USING in this sql statement? or USING concept in brief? Thank you.
Read Answers (4) | Asked by : michelle

Latest Answer : First create a Trigger and with Procedure you insert records.The :new will take the new values.So use Triggers in Procedures. ...
Read Answers (1) | Asked by : p


 Sponsored Links

 
Related Articles

ODP.NET - Retrieving Multiple Rows on to the Grid

ODP NET Retrieving Multiple Rows on to the Grid In the previous section we tried to retrieve only one row using OracleDataReader In this section we will try to retrieve more than one row or a result set and populate a DataGridView on a WinForm mosgoogle The following code lists out the details of al
 

What is an Ad Hoc Query

An Ad-Hoc Query is a query that cannot be determined prior to the moment the query is issued. It is created in order to get information when need arises and it consists of dynamically constructed SQL which is usually constructed by desktop-resident query tools. This is in contrast to any query which
 

printf() Function Return Value

What is the return value from printf() function? printf function always returns the number of characters printed. Let us understand this with an example: main() { int a=10; printf("%d",printf("%d %d %d", a,a,a)); } In this above program the inner printf i
 

What is the default return value of a function?

The default return value from a function is int. In other words, unless explicitly specified the default return value by compiler would be integer value from function.   When a programmer wants other than integer values to be returned from function then it is essential that the pro
 

exit and return statements

  How does the exit () and return () differ exit () is used to exit the program as a whole. In other words it returns control to the operating system. After exit () all memory and temporary storage areas are all flushed out and control goes out of program. In contrast, the return () stateme
 

XML Remote Calling Procedure

XML Remote Calling Procedure XML RPC or the XML Remote Calling Procedure is a set of compilations and implementations which allow certain programs to run on complex platforms or operating systems and allows them to make Remote Procedure calls on the Internet The Remote Procedure Calling Protocol use
 

Procedure for getting Scholarships

Procedure for getting Scholarships If you have done a bit of research you are probably well aware of the fact that there is a great deal of money available for scholarships Having said that it is sad to see that so many students graduate from college with lots of students loans when they could have
 

How To Select The Best CRM Solution For Your Business

How To Select The Best CRM Solution For Your Business When most people talk about Customer relationship management they use the term in a context that is connected to large corporations However the costs of CRM systems have continued to fall in the last few years and it is now in the price range of
 

Structured Query Language (SQL) - Basic Concepts

Structured Query Language SQL Basic Concepts Having query about what a SQL is It is Structured Query language It is a non procedural language and it is a database language mosgoogle Categories in SQL commands There are 3 broad categories in SQL commands They are namely Data Definition language DDL
 

Multiple Virtual Storage (MVS)

Multiple Virtual Storage MVS First let us start with an insight to the topic Multiple Virtual Storage MVS stands for Multiple Virtual Storage and this is the technology used mainly with IBM mainframe systems MVS origin is interesting to know The first developed technology was MVT which stands for Mu
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape