Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Records/Tables

Re: PL/SQL Records/Tables

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 25 Mar 2006 16:44:31 -0800
Message-ID: <1143333871.783526.282770@i40g2000cwc.googlegroups.com>


Dereck, depending on exactly what you want to do the manner in which an application would walk through data varies.

PL/SQL does support collection data types. See the PL/SQL manual.

One type is a pl/sql table which is basically the single dimension array of procedural languages. A developer at our site wrote a VB program that received a pl/sql table back to the application so they can be used with applications (stored code called from application)

Unfortunately I do not have a good example on my home PC or a working Oracle installed but here are a couple of lines from the PL/SQL manual:

TYPE nested_type IS TABLE OF VARCHAR2(20); -- declare type

v1 nested_type;                                                    --
allocate table (array)
v1 := nested_type('Arbitrary','number','of','strings'); -- you are more likely to see assignments in the form: v1(I) := 'Arbitrary'; v2(I) := 'number';

Cursor variables are often used to pass data back to the application.

HTH -- Mark D Powell -- Received on Sat Mar 25 2006 - 18:44:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US