《Oracle PL/SQL开发指南》学习笔记22——函数和过程(Functions and Procedures)(章节回顾、测试)

本文深入探讨了函数和过程的架构,包括传值调用和传引用调用的区别,内联与自主执行的特性,参数模式如IN、INOUT和OUT的使用,以及如何通过ACCESSIBLEBY子句进行白名单设置。同时,文章还讨论了NOCOPY提示在参数传递中的作用。

 

Function and Procedure Architecture

Review Section
This section has described the following points about the architecture of functions and procedures:
1. Pass-by-value functions are black boxes that perform tasks by consuming inputs and returning a completely new result.
2. Pass-by-value procedures are black boxes that perform tasks by consuming inputs without returning a result.
3. Pass-by-reference functions are black boxes that perform tasks by consuming some inputs and returning other inputs as altered values to the calling variables, and returning a completely new result.
4. Pass-by-reference procedures are black boxes that perform tasks by consuming some inputs and returning other inputs as altered values to the calling variables.
5. Inline functions and procedures run in the same transaction scope as the calling program unit.
6. Autonomous functions and procedures run in a different transaction scope from the calling program unit.
7. The IN mode is the default mode and is a pass-by-value parameter, and the IN OUT and OUT modes are pass-by-reference parameters.
8. The ACCESSIBLE BY clause lets you white list functions and procedures.
9.  Final control of whether the NOCOPY hint passes a copy or a reference to the parameter rests with Oracle’s PL/SQL engine.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值