Oracle Stored Procedure type:
1, in: The input type, that is, the application passes data into the Oracle stored procedure, this parameter is read-only parameter in the stored procedure, cannot modify the parameter of the type in the stored procedure;
2, out: The output parameter, is in the stored procedure to assign the value, obtains the value in the program.
3, in out: input and output parameters, both of the above characteristics, but readable and writable.
Verify input parameters:
Because the default parameter is the input type, in, the Bacount parameter is assigned a value, error.
Workaround:
CREATE OR REPLACEPackage Body BAWQ_PROC_JGZX isPROCEDUREproc_csjgzx (PprocVARCHAR2, Bacountint:=3) isIint:=Bacount;--define variables, replace parameters with variablesBEGINI:=Bacount;dbms_output.put_line (i); Deletecsjgzx; whileI>0LOOP I:=I-1 ; Insert intoCSJGZX (Csjgzx_proc,id,bh,mc,data)Values(Pproc,sys_guid (), Sys_guid (),'Jinan',cast(Dbms_random. VALUE (1, $) as int)); Commit; EndLoop;ENDproc_csjgzx;ENDBAWQ_PROC_JGZX;
In short, in is the message that is passed to the stored procedure when the stored procedure is called. Out is a message that the stored procedure is outgoing from the caller. In-out is the communication between the two.
oracle--Stored Procedure Parameters