Skip to content

Commit bfecf52

Browse files
authored
Merge pull request #231 from jiaoshuntian/5_fix224
fix issue #224
2 parents e11c246 + 92ef35d commit bfecf52

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CN/modules/ROOT/pages/7.22.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,14 @@ ivorysql=# PRINT default_result;
115115
=== 在参数或INTO子句中引用绑定变量
116116
[source,sql]
117117
----
118+
-- 创建独立函数 stand_alone_func
119+
CREATE OR REPLACE FUNCTION stand_alone_func(p_input NUMBER)
120+
RETURN NUMBER
121+
IS
122+
BEGIN
123+
RETURN p_input * 2;
124+
END;
125+
/
118126
-- 设置输入绑定变量
119127
ivorysql=# VARIABLE input_num NUMBER = 7;
120128
-- 使用绑定变量作为参数调用函数

EN/modules/ROOT/pages/7.22.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,14 @@ ivorysql=# PRINT default_result;
115115
=== Reference bind variables in parameters or INTO clauses
116116
[source,sql]
117117
----
118+
-- Create functions stand_alone_func
119+
CREATE OR REPLACE FUNCTION stand_alone_func(p_input NUMBER)
120+
RETURN NUMBER
121+
IS
122+
BEGIN
123+
RETURN p_input * 2;
124+
END;
125+
/
118126
-- Set input bind variables
119127
ivorysql=# VARIABLE input_num NUMBER = 7;
120128
-- Call a function using bind variables as parameters

0 commit comments

Comments
 (0)