Stored Procedures in Oracle (Stored Procedure)

Source: Internet
Author: User

I. Definition of stored procedures

Stored Procedures (Stored Procedure) are in a large database system, a set of SQL statements to complete a specific function, stored in the database, after the first compilation after the call does not need to compile again, The user executes it by specifying the name of the stored procedure and giving the parameter (if the stored procedure has parameters). A stored procedure is an important object in a database.

Two. Basic syntax creating stored proceduresCREATE PROCEDURE Sp_name@[parameter name] [type],@[parameter name] [type] asbegin                       .........EndThe above format can also be simply written as:CREATE proc Sp_name@[parameter name] [type],@[parameter name] [type] asbegin                       .........End/* Note: "Sp_name" is the name of the stored procedure that needs to be created, the name cannot begin with an Arabic numeral */Call a stored procedure1. Basic syntax:exec sp_name [parameter name]To delete a stored procedure1. Basic syntax:drop procedure Sp_name2. Precautions:You cannot delete another stored procedure in one stored procedure, only another stored procedure can be called

Stored Procedures in Oracle (Stored Procedure)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.