PL/SQL是没命名的存储过程,函数,触发器,PL/SQL块的语法格式如下: [declare] --声明部分,可选 begin --执行部分,必须 [exception] --异常处理部分,可选 end PL/SQL块每条语句必须用分号结束,单行注释--,多行注释/*...*/,下面是一个PL/SQL块例子 set serveroutput on declare --声明变量 a int := 1; --声明并且赋值 address varchar2(128); mobilephone va…
一.PL/SQL记录 定义: TYPE <类型名> IS RECORD <列名1 类型1,列名2 类型2,...列名n 类型n,> [NOT NULL] <列的类型>可以为Oracle的数据类行以及用户自定义类型;可以是记录类型的嵌套. 二.PL/SQL表 定义: TYPE <类型名> IS TABLE OF <列的类型> [NOT NULL] INDEX BY BINARY_INTEGER; <列的类型>可以为Oracle的数据类行…
SQL is not very flexible and it cannot be made to react differently to differing sutuations easily. In SQL queries we normally tell database what we want but not tell it how to do it. SQL : give commands, commands complete with ; PL/SQL : follow the…