Saturday, March 14, 2009

Embedded Procedure

You can put a print procedure in your code, and call that instead of typing DBMS_Output.Put_Line repeatedly.

The Code:

Declare
vText Varchar2(20) := 'Test Text';

Procedure pDOPL ( P_String in VARCHAR2 ) is
Begin
DBMS_OUTPUT.put_line(p_String);
End;
Begin
pDOPL ('Stmt# 1');
pDOPL ('Stmt# 2');
pDOPL (vText);
End;
/

The Output:

Stmt# 1
Stmt# 2
Test Text

No comments:

Post a Comment