1. Introduction
Procedures are used to perform specific operations, when the process is established, you can specify either an input parameter (in) or an output parameter (out), you can pass the data to the execution section by using the input parameters in the process, and by using the output parameters, you can pass the execution part of the data to the application environment, in the sql/ The process is created through the CREATE procedure in plus.
Following through the Scott scenario (The Scott scenario is a scenario that comes with the Oracle database, make sure that the scenario is available, that is, the Scott User is unlocked) to implement a case before implementing the following code:
1.1, write a process, by entering the user name and a new annual salary, to modify the employee's original salary, the code is as follows:
Create procedure varchar2 Number )isbeginupdateset sal=where ename= name; End;
You first create a procedure that specifies the output parameters. Then perform a specific procedure based on the input parameters.
1.2, the implementation process
There are two ways of specifying a procedure
The first type:
OK, revise your annual salary success by using exec execution process!
The second type:
OK, revise your yearly salary by using the call execution process!
Process of Oracle PL/SQL blocks