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