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 @@ -189,6 +189,16 @@ ERROR: invalid input syntax for type numeric: "Test processed"
=== 输出绑定变量不允许重复绑定
[source,sql]
----
-- 创建带 OUT 参数和返回值的函数(供 INTO 子句使用)
ivorysql=# CREATE OR REPLACE FUNCTION out_param_func(
ivorysql(# p_in IN VARCHAR2,
ivorysql(# p_out OUT VARCHAR2
ivorysql(# ) RETURN NUMBER IS
ivorysql-# BEGIN
ivorysql-# p_out := p_in || ' processed';
ivorysql-# RETURN LENGTH(p_in);
ivorysql-# END;
ivorysql-# /
-- 准备绑定变量
ivorysql=# VARIABLE dup_var VARCHAR2(100);
-- 尝试重复绑定(会报错)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@ ERROR: invalid input syntax for type numeric: "Test processed"
=== Output binding variables do not allow duplicate binding.
[source,sql]
----
-- Create a function with an OUT parameter and a return value (for use with the INTO clause)
ivorysql=# CREATE OR REPLACE FUNCTION out_param_func(
ivorysql(# p_in IN VARCHAR2,
ivorysql(# p_out OUT VARCHAR2
ivorysql(# ) RETURN NUMBER IS
ivorysql-# BEGIN
ivorysql-# p_out := p_in || ' processed';
ivorysql-# RETURN LENGTH(p_in);
ivorysql-# END;
ivorysql-# /
-- Prepare binding variables
ivorysql=# VARIABLE dup_var VARCHAR2(100);
-- Attempting duplicate binding (will throw an error)
Expand Down
Loading