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)