Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

initializing a pl/sql table with a list

Guess2Apr 7 2008 — edited Apr 7 2008
oracle 10.2

I never do this. I generally use a loop or a sql statement to populate a pl/sql table. I have done this in other languages, but can't find the syntax.

type mytable is table of user_tables.table_name%type
index by binary_integer;

vTable mytable := {'TABLE1','TABLE2',TABLE3'}

This takes less lines than

vTable(0) := 'TABLE1';
vTable(1) := 'TABLE2';

etc....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2008
Added on Apr 7 2008
2 comments
397 views