SQL>
SQL> CREATE OR REPLACE PROCEDURE show_line(ip_line_length IN NUMBER,ip_separator IN VARCHAR2)
2 IS
3 myString VARCHAR2(150);
4 BEGIN
5
6 FOR idx in 1..ip_line_length LOOP
7
8 myString := myString || ip_separator;
9
10 END LOOP;
11
12 DBMS_OUTPUT.PUT_LINE(myString);
13
14 EXCEPTION WHEN OTHERS THEN
15
16 dbms_output.put_line(SQLERRM);
17 END;
18 /
Procedure created.
SQL>
SQL> DECLARE
2
3 v_length NUMBER :=50;
4
5 v_separator VARCHAR2(1):='=';
6
7 BEGIN
8
9 show_line(v_length,ip_separator=>v_separator);
10
11 END;
12 /