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: Declaring a global table in PL/SQL

Re: Declaring a global table in PL/SQL

From: Billy <vslabs_at_onwe.co.za>
Date: 4 Aug 2005 01:08:50 -0700
Message-ID: <1123142930.787250.185360@g14g2000cwa.googlegroups.com>


absinth wrote:
> Why can't I have?
>
> CREATE OR REPLACE PACKAGE BODY test AS
> TYPE test_table IS TABLE OF VARCHAR2(30)
> INDEX BY VARCHAR2(2);
>
> DEMO_TABLE test_table;
> DEMO_TABLE('NO') := 'No';
>
> END test;
> /

You can - as the responses show.

But there is nothing "table" about PL/SQL "tables". The *CORRECT* definition is dynamic arrays. And is what is used in every other programming language out there.

There's also a huge questionmark about why wanting to declare a global dynamic array. 99% of the time is nothing but a brain fart that is without substance and plain stinks. Where is the best place for data in Oracle to reside? And the "in-a-global-dynamic-array" answer to that is few and very far in-between.

--
Billy
Received on Thu Aug 04 2005 - 03:08:50 CDT

Original text of this message

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