Oracle PL/SQL - Write your PL/SQL code to output string value

Description

Write your PL/SQL code to output string value

Demo

SQL>
SQL>-- from   w w  w.j av  a 2 s. co m
SQL> declare
  2     my_val varchar2(256):='Hello, World!';
  3  begin
  4     dbms_output.put_line(my_val);
  5  end;
  6  /
Hello, World!

PL/SQL procedure successfully completed.

SQL>

Each complete line of the PL/SQL code must end with a semicolon ;.

To run the code, type / at the beginning of the first blank line after the last line of the code.

/ is a SQL*Plus command to execute the last SQL or PL/SQL statement.

The DBMS_OUTPUT.PUT_LINE command sends whatever text you passed as a parameter back to the client console.

Related Topic