Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle BEGIN Statement      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

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      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 179 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?