parameter_name [mode] parameter_type{:= |DEFAULT} initial_value 例如: CREATE OR REPLACE PROCEDURE AddNewStudent ( p_FirstName students.first_name%TYPE, p_LastName students.last_name%TYPE, p_Major students.major%TYPE DEFAULT 'Economics') AS BEGIN -- Insert a new row in the students table. Use -- student_sequence to generate the new student ID, and -- 0 for current_credits. INSERT INTO students VALUES (student_sequence.nextval, p_FirstName, p_LastName, p_Major, 0); END AddNewStudent;
create procedure pro(p1 in varchar2 default '1',p2 in varchar2 default 'eee') as ...
例如:
CREATE OR REPLACE PROCEDURE AddNewStudent (
p_FirstName students.first_name%TYPE,
p_LastName students.last_name%TYPE,
p_Major students.major%TYPE DEFAULT 'Economics') AS
BEGIN
-- Insert a new row in the students table. Use
-- student_sequence to generate the new student ID, and
-- 0 for current_credits.
INSERT INTO students VALUES (student_sequence.nextval,
p_FirstName, p_LastName, p_Major, 0);
END AddNewStudent;
as
...