Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ ivorysql=# PRINT default_result;
=== 在参数或INTO子句中引用绑定变量
[source,sql]
----
-- 创建独立函数 stand_alone_func
CREATE OR REPLACE FUNCTION stand_alone_func(p_input NUMBER)
RETURN NUMBER
IS
BEGIN
RETURN p_input * 2;
END;
/
-- 设置输入绑定变量
ivorysql=# VARIABLE input_num NUMBER = 7;
-- 使用绑定变量作为参数调用函数
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ ivorysql=# PRINT default_result;
=== Reference bind variables in parameters or INTO clauses
[source,sql]
----
-- Create functions stand_alone_func
CREATE OR REPLACE FUNCTION stand_alone_func(p_input NUMBER)
RETURN NUMBER
IS
BEGIN
RETURN p_input * 2;
END;
/
-- Set input bind variables
ivorysql=# VARIABLE input_num NUMBER = 7;
-- Call a function using bind variables as parameters
Expand Down
Loading