Index | Home | Forums
Oracle PL/SQL Example 8-1 Simple PL/SQL Procedure

Example 8-1 Simple PL/SQL Procedure

DECLARE
  in_string  VARCHAR2(100) := 'This is my test string.';
  out_string VARCHAR2(200);
  PROCEDURE double ( original IN VARCHAR2, new_string OUT VARCHAR2 ) AS
    BEGIN
      new_string := original || ' + ' || original;
      EXCEPTION
      WHEN VALUE_ERROR THEN
        DBMS_OUTPUT.PUT_LINE('Output buffer not long enough.');
    END;
BEGIN
  double(in_string, out_string);
  DBMS_OUTPUT.PUT_LINE(in_string || ' - ' || out_string);
END;
/


This page was created by oracleabc.com on Feb 23,2008 00:09:02
General comments and questions regarding this document should be sent by email to info@oracleabc.com or post your comments here