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  >  Interview Questions  >  Oracle  >  PL/SQL

 Print  |  
Question:  Retriving Multiple Records

Answer: Why PL/SQL does not support retriving multiple records?


September 09, 2009 13:51:45 #4
 promisinganuj   Member Since: September 2009    Total Comments: 3 

RE: Retriving Multiple Records
 

Retriving multiple records is a basic feature of SQL where we fetch the data using SELECT statement.
SELECT *
  FROM emp;
This itself gives us multiple records. There is no additional feature required to do the same in PL/SQL.
At the same time, PL/SQL goes one step further and enable us to process these fetched rows one by one (unlike the update statements which updates all the rows selected).
There are several options for fethcing data in different PL/SQL constructs:
1. Using Ordinary Cursor
2. Using Ref Cursor
3. Using PL/SQL bulk collect
4. Using PL/SQL arrays

But the important thing here is that irrespective of the way we fetch the data, we act upon them row-by-row.

     

 

Back To Question