Here we discuss about the basic structure of the PL/SQL block:
1. Declare
2. Begin
3. Exception
4. End
Declare:
used to define variable, constants,other PL/SQL approaches like cursors, triggers, records, collections,packages,functions,procedures, creating new Exceptions etc.
Begin:
used for writing the main logic that operate on the table data. this logic contains queries, calling the functions that are declared outside or creating the inline functions, loops, if statements, etc..
Exceptions:
used for handling the errors.
End:
states that it is the end of the PL/SQL block.
| declare |
<declaration-section> |
| begin |
<functional-section> |
| exception |
<exception-section> |
| end; |
No comments:
Post a Comment