18-06-2012, 02:27 PM
Introduction OF Pl/sql
Plsql.ppt (Size: 162 KB / Downloads: 27)
Data types
Number,character(char),date,,Boolean,
%type :used to declare variables based on definitions of columns in the table
Not null creation of a variab;e or a constant that cannot have a null value
Variables & constants –no reserved words
Constants should be preceded by keyword constant
Declare section
Memory variables and other oracle objects are declared.
They can be used in the sql statements for data manipulation
Begin and end
Actual data manipulation, looping, retrieval and branching constructs are specified
End section marks the end of pl/sql block
End statement should be followed by semi colon.
Oracle transactions
Commit – ends the current transactions and makes permanent changes made during the transaction
rollback – it endsthe transaction nut undoes any changes made during the transaction.
Savepoint marks and saves the current point in the processing of a transaction.
Cursors
The ORACLE Engine uses a work area for its internal processing in order to execute a SQL statement
This work area is private to SQL’s operations and is called a cursor.
The data that is stored in the cursor is called the active data set.the size of the cursor in memory is the size required to hold the number of rows in the active data set