What is PL/Sql tables?Is cursor variable store in PL/SQL table?

Showing Answers 1 - 8 of 8 Answers

Sekhar

  • Apr 20th, 2006
 

What is PL/Sql tables?

Ans: PL/SQL tables are like arrays in C, the indexing starts from 1.

Is cursor variable store in PL/SQL table?  

pls be clear with ur question.

  Was this answer useful?  Yes

pravin

  • Apr 26th, 2006
 

pl/sql table is temparary table which is used to store records temrparaily in PL/SQL Block, whenever block completes execution, table is also finished.

  Was this answer useful?  Yes

manu

  • May 17th, 2006
 

Pl/Sql Table  is  like C Array .

Cursor variable doesn't store with pl/sql Table .

IT is a pointer to cursor & it is not item, It is dynamic.

  Was this answer useful?  Yes

DECLARE
   TYPE EmpCurTyp IS REF CURSOR;   // Reference Cursor - weak
   TYPE NumList IS TABLE OF NUMBER;  // Table of Number
   TYPE NameList IS TABLE OF VARCHAR2(25);  // Table of varchar2
   emp_cv EmpCurTyp;
   empids NumList;
   enames NameList;
   sals   NumList;
BEGIN
   OPEN emp_cv FOR 'SELECT employee_id, last_name FROM employees';
   FETCH emp_cv BULK COLLECT INTO empids, enames;  // fetching cursor into tables
   CLOSE emp_cv;
   EXECUTE IMMEDIATE 'SELECT salary FROM employees'
      BULK COLLECT INTO sals;
END;
/

Pixie

  • Feb 18th, 2014
 

PL/SQL tables are PL/SQL’s way of providing arrays. They are temporary tables in memory and thus are processed very quickly. They are not database tables, and DML statements cannot be issued against them. PL/SQL tables are indexed
by a binary integer counter whose value can be referenced using the number of the index.

Remember that PL/SQL tables exist in memory only, and therefore don’t exist in any persistent way, disappearing after the session ends.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions