1. Create an Oracle stored procedure, set a parameter n, execute the stored procedure, and pass the parameter n. After the execution, the output is five times. Note: The for statement is used in the stored procedure.
1. Create an Oracle stored procedure, set a parameter n, execute the stored procedure, and pass the parameter n. After the execution, output the parameter hello world five times. Note: The stored procedure uses the for statement.
1. Create an Oracle stored procedure and set the parameter n
Then run the stored procedure to pass a parameter n, and output the hello world five times.
Note: Use the for loop in the stored procedure and execute the exec
Create or replace procedure Hello (n in number)
Is begin
For I in 1. n loop
Dbms_output.put_line ('Hello World ');
End loop;
End;
/
-- Open output
Set serveroutput on;
-- Execute this function
Execute Hello (5 );
2. Create a sequence (Initial Value 1030, step 1 ),
Use this sequence to insert two data records to the emp table.
(The sequence creation statement and the data insertion statement must be written)
Create sequence myse increment by 1 start with 1030;
Insert into emp_xxx values (myse. nextval, 'zhang Wuji ', 'manager', '12-January 10 );
,