Exforsys.com
 
Home Tutorials Oracle 9i
 

Tutorial 8: Building PL/SQL Blocks

 

Tutorial 8: Building PL/SQL Blocks - Page 2

Page 2 of 2



 


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.







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. 

 

 



First Page: Tutorial 8: Building PL/SQL Blocks


Read Next: Tutorial 9 : Oracle 9i: PL/SQL Control Structures



 

 

Comments


khalid.sk said:

  you have not formatted the html properly for this page........!
February 5, 2007, 6:12 am

MANISH THAPAK said:

  THIS TUTORIAL PACKAGE IS A COMPLETE ONE,HIGHLY SCIENTIFIC & TO-THE-POINT, COVERS ALL ASPECTS AS REQUIRED IN THE REAL
ENVIRONMENT. I M TRYING TO EXTRACT AT ITS MAXIMUM.
THANKS
October 1, 2007, 11:40 am

palash said:

  It's a very good way to learning pl/sql programming.
November 14, 2008, 2:27 am

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape