What are the development steps for creating a procedure?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What are the development steps for creating a procedure?

Rating:

Following are the development steps for creating a procedure:

  • Write the syntax: Enter the code to create a procedure (CREATE PROCEDURE statement) in a system editor or word processor and save it as a SQL script file (.sql extension).


  • Compile the code: Load and run the SQL script file by using SQL*Plus or iSQL*Plus. The source code is compiled into P (parsed) code and the procedure is created.

    Running the CREATE PROCEDURE statement stores the source code in the data dictionary even if the procedure contains compilation errors. A procedure containing a run-time or compilation error cannot be invoked successfully. In iSQL*Plus, the SHOW ERRORS statement is used to see the compilation errors. A script file with the CREATE PROCEDURE or CREATE OR REPLACE PROCEDURE statement enables changing the statement if there is any run-time or compilation error. The errors can be fixed by using the editor and then the procedure can be recompiled.


  • Execute the procedure: After the source code is compiled and the procedure is successfully created, the procedure can be executed any number of times by using the EXECUTE statement from iSQL*Plus. The PL/SQL compiler generates the pseudocode or P code based on the parsed code. The PL/SQL engine executes the P code when the procedure is invoked.

  • Rating:



    Other articles

    Click here to Article home

     
    uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
    MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
    Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
    © 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.