By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,130 Members | 2,100 Online
Bytes IT Community
Submit an Article
Got Smarts?
Share your bits of IT knowledge by writing an article on Bytes.

Oracle PL/SQL 9i/10g - Introduction

debasisdas
Expert 5K+
P: 8,127
This Article contains some useful tips in oracle PL/SQL in 9i/10g which the forum members might find useful

Advantages of PL/SQL
===================

1.Support for SQL
2.Support for object-oriented programming
3.Better performance
4.Higher productivity
5.Full portability
6.Tight integration with Oracle
7.Tight security

Types of Blocks in PL/SQL

1.anonymous Block
2.named Block/stored Procedure

Features of PL/SQL

1.block Structure
2.variable And Constants
3.control Structure
4.exception Handling
5.cursor
6.procedure
7.function
8.package
9.trigger
10.user-defined Types

Basic Structure of PL/SQL Block

Expand|Select|Wrap|Line Numbers
  1. DECLARE
  2. <VARIABLE>
  3. <CURSOR>
  4. <EXCEPTION>
  5. ...................
  6. ...................
  7. BEGIN
  8. <EXECUTABLE STATEMENT>
  9. EXCEPTION
  10. <EXCEPTION HANDLER>
  11. END;
  12.  
PL/SQL--Data Types

1.Scalar--------NUMBER,VARCHAR2,DATE,BOOLEAN ...etc.
2.Reference-----REF CURSOR
3.Composite-----RECORDTYPE,NESTED TABLE,VARRYING ARRAY
4.LOB-----------BLOB,CLOB,NCLOB,BFILE
5.Anchoring-----%TYPE,%ROWTYPE

The following datatypes are also supported for cross-language compatability.

SMALLINT,NATURAL,NATURALN,POSITIVE,POSITIVEN,
PLS_INTEGER,DEC,DECIMAL
BINARY_INTEGER,BINARY_FLOAT,BINARY_DOUBLE
May 10 '07 #1
Share this Article
Share on Google+