Initial PL/SQL usage

Source: Internet
Author: User
PL/SQL is block-based.

The PL/SQL block structure is as follows: declare .... begin .... exception .... end; variable Declaration: declare X varchar2 (400); begin X: = 'this is .... ';
Dbms_output.put_line ('x value: '| X ); 2
End 3
; 4
/Note the semicolon. End.
In dos, no information is output by default. You can use serveroutput on size 1000; size.
The size in the buffer zone. The maximum value is 1 million. At this time, the execution of '/' will print... this is a simple execution process of PL/SQL blocks. Here, dbmsoutput is a package provided by the system and a tool for external interaction. PL/SQL ProgramBefore the end, sqlplus does not retrieve any display data from the buffer. Example: declare X varchar2 (400): = 'abc'; y INTEGER: = 123; begin X: = 'this is .... '; Y: = 1; dbms_output.put_line ('x value:' | X); dbms_output.put_line ('y value: '| y ); End ; SQL> @ F: \ plsql01.txt; /Execute print: the value of X: this is... the value of Y: 1

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.