Tuesday, 22 May 2012

How can you display data from a PL/SQL block? | PL SQL

An Oracle supplied package called DBMS_OUTPUT is used to display data within a PL/SQL block. The set server output on command has to be executed before using this package, which has the following three procedures:
?    PUT— Displays multiple output on the same line
?    PUT_LINE— Displays each output on separate line
?    NEW_LINE — Signals new line after each output and used along with the PUT procedure
The  following code shows the implementation of the DBMS_OUTPUT package: