How to disable old and new value option in output when I run PL/SQL program

Chaitanya picture Chaitanya · Mar 27, 2013 · Viewed 16k times · Source

I am new to pl/sql so this might be a silly question, I created a simple PL/SQL program:

DECLARE
        inputData VARCHAR2(1024);
BEGIN
        inputData :='&&inputData' ;
        Dbms_Output.put_line('Value entered is:' || inputData);
END;
/

When I run this program, I am getting below output:

Enter value for inputdata: check
old   4:         inputData :='&&inputData' ;
new   4:         inputData :='check' ;
Value entered is:check

PL/SQL procedure successfully completed.

How can we get rid of lines for old and new values when the output is displayed.

Answer

DazzaL picture DazzaL · Mar 27, 2013

simply set this (see the sqlplus user guide):

set verify off

at the top of your script.

SQL> set verify off
SQL> DECLARE
  2          inputData VARCHAR2(1024);
  3  BEGIN
  4          inputData :='&&inputData' ;
  5          Dbms_Output.put_line('Value entered is:' || inputData);
  6  END;
  7  /
Enter value for inputdata: sdf

PL/SQL procedure successfully completed.

SQL>