我在 Oracle 18c 中有这个非常简单的过程,编译得很好
CREATE OR REPLACE PROCEDURE quera_vcelar
(v_cislo_ula IN INFORMACIE_ULOV.cislo_ula%TYPE,
v_meno OUT VARCHAR2,
v_bydlisko OUT UDAJE_VCELAROV.bydlisko%TYPE)
IS
BEGIN
SELECT meno || ' ' || priezvisko,bydlisko
INTO v_meno,v_bydlisko
FROM UDAJE_VCELAROV uv JOIN INFORMACIE_ULOV iu ON(uv.cislo_ula = iu.cislo_ula)
WHERE iu.cislo_ula = v_cislo_ula;
END quera_vcelar;
/
但是在我初始化变量并尝试运行它之后
VARIABLE p_meno VARCHAR2(30)
VARIABLE p_bydlisko VARCHAR2(20)
EXECUTE quera_vcelar(10, :p_meno :p_bydlisko);
PRINT p_meno p_bydlisko;
我收到这个错误
Error starting at line : 17 in command -
BEGIN quera_vcelar(10, :p_meno :p_bydlisko); END;
Error report -
ORA-06550: line 1, column 42:
PLS-00103: Encountered the symbol "SQLDEVBIND1Z_1" when expecting one of the following:
. ( ) , * @ % & = - + < / > at in is mod remainder not rem =>
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
The symbol "." was substituted for "SQLDEVBIND1Z_1" to continue.
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
可悲的是,我在任何地方都找不到任何答案。