当前位置:网站首页>Database advanced learning notes -- storage functions
Database advanced learning notes -- storage functions
2022-07-28 09:51:00 【Pingguo stuffed with rice cakes】
--1. The difference between stored procedure and stored function
Storage functions have return Return value
--2. The relationship between stored procedures and stored functions
Stored functions can be interchanged with stored procedures , The storage function can be called in stored procedure.
--3. Be careful
If there is only one return value , With storage functions , otherwise , Just use stored procedures .
--4. Storage function syntax
grammar :create or replace function( Parameters Parameter type ) return Variable type is
begin
Code block ;
return Outcome variable ;
end;
example ; Create a function , Take employee number as parameter , Return the salary of the employee
create or replace function fun_name101(v_empno in emps.empno%type)
return emps.sal%type is
v_sal emps.sal%type;
begin
select sal into v_sal from emps where empno=v_empno;
return v_sal;
end;
-- call
select fun_name101(7788) from dual;
边栏推荐
- SizeBasedTriggeringPolicy简介说明
- Window source code analysis (IV): window deletion mechanism
- 7.27 最小生成树阶段性测试题解
- [log] what does a log do? What is a log factory? Configuration and use of log4j? log4j. Properties file configuration, log4j jar package coordinates
- Common tool functions are constantly updated
- Introduction to shardingsphere (I)
- Word segmentation results of ES query index fields
- 哪些字符串会被FastJson解析为null呢?
- go语言切片Slice和数组Array对比panic runtime error index out of range问题解决
- Pytorch deep learning practice lesson 9 multi classification problems (handwritten numeral MNIST)
猜你喜欢

JS array is de duplicated, the ID is the same, and a value is added and merged
![[log] what does a log do? What is a log factory? Configuration and use of log4j? log4j. Properties file configuration, log4j jar package coordinates](/img/ae/096b558bc1342447205b442a244aae.png)
[log] what does a log do? What is a log factory? Configuration and use of log4j? log4j. Properties file configuration, log4j jar package coordinates

C countdown tool
![ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器](/img/90/40869d7c03f09010beb989af07e2f0.png)
ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器

IDC script file running
C form application uses object binding DataGridView data binding

Introduction to SD card (based on spec3.0)

Time series analysis 41 - time series prediction tbats model

Introduction to shardingsphere's concept of sub database and sub table (2)

pycharm使用conda调用远程服务器
随机推荐
C# 窗体应用使用对象绑定 DataGridView 数据绑定
初学C#必须要掌握的基础例题
3分钟带你了解微信小程序开发
OpenAtom OpenHarmony分论坛,今天14:00见!附大事记精彩发布
IJCAI 2022 | the latest overview of graph structure learning: research progress and future prospects
Window源码解析(二):Window的添加机制
Linux操作系统(Centos7)安装MySQL
ARouter源码解析(三)
哪些字符串会被FastJson解析为null呢?
(iros 2022) monocular visual inertial odometer based on event camera
Translation recommendation | debugging bookkeeper protocol - unbounded ledger
Scalable search bar, imitating Huawei application market
NET 3行代码实现文字转语音功能
Standing on the shoulders of big men, you can see further
ActivityRouter源码解析
ARouter源码解析(一)
Edge团队详解如何通过磁盘缓存压缩技术提升综合性能体验
7.27 最小生成树阶段性测试题解
Symbolic operation of MATLAB
C form application uses object binding DataGridView data binding