Quick Search:
 
 The Oracle BEGIN Statement      [Return To Index] Jump to:  

Term: BEGIN

Definition:
The BEGIN statement marks the start of an executable block of PL/SQL. A block may contain one or more PL/SQL statements, and all blocks must have the two keywords BEGIN and END.

DECLARE
variable declarations
BEGIN
sql statements
end;


Example Usage
This example creates a trigger and demonstrates the BEGIN statement:

CREATE OR REPLACE TRIGGER statement_level
BEFORE UPDATE
ON orders

DECLARE
vMsg VARCHAR2(30) := 'Statement Level Trigger Fired';
BEGIN
dbms_output.put_line(vMsg);
END statement_level;
/



Related Links:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org