PL/SQL Programming

Source: Internet
Author: User
Tags exception handling

PL/SQL Programming one: Preface



II: PL/SQL Overview


Two--1:PL/SQL block structure

  1 "declare"  2--declaration section, optional   3 begin  4--execution part, must   5 [exception]  6--Exception handling section, optional   7 End

1Sql> set serveroutput on;2Sql>3Sql> Declare42 a int:=10;53 b int:=200;64 c number;75 begin86 c:= (A+B)/(A-B);97 Dbms_output.put_line (c);Ten8 exception One9 when Zero_divide Then ATen Dbms_output.put_line ('the divisor is forbidden to zero .‘); -one end; -12/ the  --1.10526315789473684210526315789473684211 -  -PL/SQL procedure successfully completed +  -Sql>
View Code


Two--2: code comments and identifiers





















——————————————



























——————————————————————————————————————————————————————————

PL/SQL Programming

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.