易截截图软件、单文件、免安装、纯绿色、仅160KB

Oracle存储过程

 Oracle存储过程功能强大,他主要的作用有以下几点:
1.可以批量执行sql语句,提供内置的事务支持,同时能够提高数据库操作的效率。
2.客户端程序依据存储过程名来调用,提供程序的可移植性。
3.提供复杂的SQL语句逻辑支持。
语法结构包括过程声明,执行过程部分,存储过程异常
1)不带参数:
Create or replace procedure NoparProcedureName
is
begin
delete from tablename  a where a.id='';
delete from tablename b where b.id=''; 
exception
end;
2)带参数:
Create or replace procedure ParProcedureName(key_id in char)
is
begin
delete from tablename  a where a.id=key_id;
update tablename b set b.name='测试' where b.id=key_id; 
exception
end;
3)带参数含赋值
Create or replace procedure MyProcedureName(key_id in char,isal out varchar)
is icount number ;
begin
select count(*) into icount from emp where sal>isal ;
if icount==1 then ...
esle
...
end if ;
end


相关文档:

oracle 函数整理(一)

1. ASCII: 返回与指定的字符对应的十进制数;
SQL> select ascii('A') A,ascii('a') a,ascii(0) zero,ascii('') space from dual; 
   A A ZERO SPACE
   --------- --------- --------- ---------
   65 97 48 
2. CHR:给出整数,返回对应的字符;
SQ ......

Oracle触发器(概念和类型)

1.       引言
 
2.       触发器的概念和类型
触发器是一种特殊的存储过程,它在插入,删除或修改特定表中的数据时触发执行,它比数据库本身标准的功能有更精细和更复杂的数据控制能力。数据库触发器有以下的作用:
* 安全性。可以基于数据库的值 ......

ORACLE等待事件类型(一)

author:skate
tiime:2009-11-18
ORACLE等待事件类型【Classes of Wait Events】
每一个等待事件都属于某一类,下面给出了每一类等待事件的描述。【Every wait event belongs to a class of wait event.
The following list describes each of the wait classes.】
1. 管理类:Administrative
此类等待事件是由于DBA的 ......

Oracle 9i的数据类型

 
 Oracle 9i共提供了16种标量数据类型,如表7.4所示。
表7.4 Oracle 9i的标量数据类型
名称
含义
Char
用于描述定长的字符型数据,长度<=2000字节
varchar2
用于描述变长的字符型数据,长度<=4000字节
nchar
用来存储Unicode字符集的定长字符型数据,长度<=1000字节
nvarchar2
用来存储Un ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号