Exforsys

Home arrow Technical Training arrow Oracle 9i Training

Building PL/SQL Blocks in Oracle 9i Page - 2

Page 2 of 2
Author : Exforsys Inc.     Published on: 16th Feb 2005    |   Last Updated on: 3rd Jan 2011

Building PL/SQL Blocks in Oracle 9i

Ads

 

SQL > / 
Welcome To PL/SQL Programming

PL/SQL procedure successfully completed.

Scope and Visibility of Variables : An identifier in PL/SQL block is considered as local to that block and global to all its Sub-blocks. Which is better understood from the following example.


There are 2 composite datatypes. TABLE and

RECORD. Objects of type RECORD are called records. Objects of type TABLE are called PL/SQL table.

User-Defined Records: The %rowtype attribute can be used to store a record fetched from the table. But it is not possible to declare datatype for the fields in %rowtype. This problem is solved in the object type RECORD. The usage of %rowtype and RECORD object are explained below.



Ads

PL/SQL Tables:


PL/SQL tables are modeled as database tables but are not same as database tables. 

The size of a PL/SQL table is unconstrained i.e. it can grow dynamically whenever a new 

record is added.  Its size is constrained only by the available memory. Every PL/SQL table 

will have a primary  key column of BINARY_INTEGER type. 

 

 



 
This tutorial is part of a Oracle 9i Training tutorial series. Read it from the beginning and learn yourself.

Oracle 9i Training

 

Comments