File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff 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-- 设置输入绑定变量
119127ivorysql=# VARIABLE input_num NUMBER = 7;
120128-- 使用绑定变量作为参数调用函数
Original file line number Diff line number Diff 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
119127ivorysql=# VARIABLE input_num NUMBER = 7;
120128-- Call a function using bind variables as parameters
You can’t perform that action at this time.
0 commit comments