Using DBMS_OUTPUT

DBMS output is the main output from PL/SQL. You can use DBMS_OUTPUT to format print lines, display data (as we did with the TEMPERATURE_CONVERSION procedure), and display error conditions. This was a popular technique to display information when debugging code. It is referenced here to illustrate how easy it is to add these statements for debugging or other purposes.

Right-click on the code and select Make Output Statement (as illustrated in Figure 4.42). Put the cursor in the code where you want to put the DBMS_OUTPUT statement and paste (Ctrl+V). Fill in the text that you would like to see in the DBMS_OUTPUT tab after execution as illustrated in Figure 4.43.

Figure 4.42. Accessing the DBMS_OUTPUT blank statement.


Figure 4.43. DBMS_OUTPUT in action.


To see the DBMS_OUTPUT, you will need to make sure this option is checked in the Debugging category of the TOAD Options screen; see Figure 4.44. This is the equivalent of setting serveroutput on in SQL*Plus.


Figure 4.44. TOAD DBMS.OUTPUT settings.



..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.236.27