Oracle dbms_output Package Full reference manual (Chinese version)

Source: Internet
Author: User

First, the use of dbms_output
1. Debug code, output variables and values of expressions.
2, debugging code, output dynamic SQL splicing statements, and then run the output of the statement to debug.
3, generate reports and other functions.
Second, enable and disable the Dbms_output function
1, set serveroutput on, enable Dbms_output.
2, set Serveroutput off, disable dbms_output.
Third, set the dbms_output buffer size
1, the default value is 20000 bytes
2, set the scope of the scope of use Dbms_output. ENABLE ("New buffer Size").
3. Set this session scope using set serveroutput on size "New buffer size".
Four, dbms_output reference

Name Type Parameter list Parameter description Function description
Dbms_output. Chararr TYPE The type of the parameter lines as the Get_lines.
Dbms_output. ENABLE PROCEDURE

Buffer_size in INTEGER DEFAULT

Buffer_size: Buffer size, do not lose default value 20000 Dbms_output is enabled at the current scope, and the buffer size can be modified.
Dbms_output. DISABLE PROCEDURE No Deactivate Dbms_output in the current scope.
Dbms_output. PUT PROCEDURE Line in VARCHAR2 Line: The text to output Enter text into the buffer, not output.
Dbms_output. Put_Line PROCEDURE Line in VARCHAR2 Line: The text to output Enter text and a newline character into the buffer, output all the text in the buffer, and then empty the line break.
Dbms_output. New_line PROCEDURE No Adds a newline character to the buffer, outputs all the text in the buffer, and then empties the line break.
Dbms_output. Get_line PROCEDURE

Line out VARCHAR2, status out INTEGER

Line: Receive text, do not include newline character parameter status:0= call succeeded, 1 = no more rows Extracts the first line of text from the buffer to lines and empties the buffer.
Dbms_output. Get_lines PROCEDURE Lines out Chararr,numlines on out INTEGER

Lines: array numlines that receives multiple lines of text: the input is the number of rows to get, and if the input and output are consistent, the call succeeds. Otherwise no more rows

Extracts the Numlines line text from the first line in the buffer to lines and empties the buffer.

Oracle dbms_output Package Full reference manual (Chinese version)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.