Thursday, September 15, 2011

BLOCK TYPES

BLOCK TYPES

Ø  Anonymous blocks
Ø  Named blocks
ü  Labeled blocks
ü  Subprograms
ü  Triggers

ANONYMOUS BLOCKS

Anonymous blocks implies basic block structure.
Ex:
            BEGIN
                 Dbms_output.put_line(‘My first program’):
            END;

LABELED BLOCKS

Labeled blocks are anonymous blocks with a label which gives a name to the block.
Ex:
            <<my_bloock>>
            BEGIN
      Dbms_output.put_line(‘My first program’):
            END;

SUBPROGRAMS

Subprograms are procedures and functions. They can be stored in the database as stand-alone objects, as part of package or as methods of an object type.

TRIGGERS

Triggers consists of a PL/SQL block that is associated with an event that occur in the database.

NESTED BLOCKS

A block can be nested within the executable or exception section of an outer block.

No comments:

Post a Comment

Oracle Escape Characters

Oracle allows the assignment of special escape characters to tell Oracle that the character is interpreted literally.  Certain characters ...