Oracle SQL, PLSQL, APEX How To's by Dr. S. Raghunathan - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

 

 

 

 

 

20-HOW TO CREATE PROCEDURE

Oracle's Procedural Language ( PL ) is the superset of Structured Query

 

Language (SQL)'  (For recap ) Structure of  PLlSQL Block Declare

<declaration section> Begin

<executable commands> Exception

<exception handling> End;

Now, we will try to create small procedure will be switch position of given value' For example, if you submit the values as 10,20 after execution of logic will be displaying the given values as 20,10' While writing the procedure, the comments and explanations will be offered with the prefix of double dash '-' which is nothing but remark lines and will be ignored while execution of procedure commands'

-- create or replace is the command for creating or replacing any

-- data base objects. In this case procedure is the database

-- object and it need a name and here it is as change_position.