Skip to Content
Advanced Oracle PL/SQL Programming with Packages
book

Advanced Oracle PL/SQL Programming with Packages

by Steven Feuerstein
October 1996
Intermediate to advanced
687 pages
16h 41m
English
O'Reilly Media, Inc.
Content preview from Advanced Oracle PL/SQL Programming with Packages

8.1. Using PLVtab-Based PL/SQL Table Types

When you use PL/SQL tables, you normally perform a number of common actions, including defining the table type, declaring the table, filling up the rows, referencing the rows, and emptying the table when done. When using a PLVtab-based table, you do not have to declare the table type. Instead you simply reference the package-based type in your declaration. PLVtab predefines the following PL/SQL table TYPEs, shown in Table 8.1:

Table 8.1. Table Types Predefined in PLVtab
TypeDescription
boolean_table
PL/SQL table of Booleans
date_table
PL/SQL table of dates
integer_table
PL/SQL table of integers
number_table
PL/SQL table of numbers
vc30_table
PL/SQL table of VARCHAR2(30) strings
vc60_table
PL/SQL table of VARCHAR2(60) strings
vc80_table
PL/SQL table of VARCHAR2(80) strings
vc2000_table
PL/SQL table of VARCHAR2(2000) strings
ident_table
PL/SQL table of VARCHAR2(100) strings; matches PLV.plsql_identifier declaration.
vcmax_table
PL/SQL table of VARCHAR2(32767) strings

Let's compare the "native" and PL/Vision approaches to defining PL/SQL tables. In the following anonymous block, I define a PL/SQL table of Booleans without the assistance of PLVtab.

DECLARE
   TYPE bool_tabtype IS TABLE OF BOOLEAN
      INDEX BY BINARY_INTEGER;
   yesno_tab bool_tabtype;
BEGIN

With the PLVtab package in place, all I have to is the following:

DECLARE
   yesno_tab PLVtab.boolean_table;
BEGIN

Once you have declared a table using PLVtab, you manipulate that table as you would ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Oracle Database 12c PL/SQL Programming

Oracle Database 12c PL/SQL Programming

Michael McLaughlin
Resilient Oracle PL/SQL

Resilient Oracle PL/SQL

Stephen B. Morris
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham

Publisher Resources

ISBN: 1565922387Catalog PageErrata