Basic Structure of PL/SQL

所有的PL / SQL程序由模塊組成,它可以相互嵌套。通常,每块执行一个逻辑。

块具有以下结构:

DECLARE

    /* Declarative section: variables, types, and local subprograms. */  

             声明部分:变量,类型和本地的子程序
    BEGIN

      /* Executable section: procedural and SQL statements go here. */
                 可执行部分:程序和SQL语句在這裡寫

      /* This is the only section of the block that is required. */
                這部分是模塊所必需的
    EXCEPTION

      /* Exception handling section: error handling statements go here. */
                 異常處理部分:錯誤語句放在這裡
END;
Only the executable section is required. The other sections are optional. The only SQL statements allowed in a PL/SQL program are SELECT, INSERT, UPDATE, DELETE and several other data manipulation statements plus some transaction control. However, the SELECT statement has a special form in which a single tuple is placed in variables; more on this later. Data definition statements like CREATE, DROP, or ALTER are not allowed. The executable section also contains constructs such as assignments, branches, loops, procedure calls, and triggers, which are all described below (except triggers). PL/SQL is not case sensitive. C style comments (/* ... */) may be used.
只有可执行部分是必需的。其他部分都是可选的。在PL / SQL程序允许只有SQL的SELECT语句,插入,更新,删除和其他一些数据操作语句加上一些事务控制。然而,在SELECT语句有一个特殊的形式,一个元组是放置在变量,更在此之后。如创建,删除或更改数据定义语句是不允许的。该可执行部分还包含如转让,分行,循环,过程调用构造和触发器等,都是除下文所述触发器()。 PL / SQL是大小写不敏感。 C风格的注释(/ * ... * /)也可使用。
Getting Started With Oracle  入門
Overview
You will be using the Oracle database system to implement your PDA (Personal Database Application) this quarter. Important: As soon as your Oracle account is set up, you should log in to change the initial password.
概观
您将使用Oracle数据库系统,实现你的PDA(个人数据库应用)本節,重要提示:Oracle帐户设置,你应该记录更改的初始密码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值