在多行中打破PL/SQL过程调用的正确语法是什么?

Moe*_*oeb 5 sql oracle plsql sqlplus ora-06550

我正在调用这样的PL/SQL过程:

execute util.verify(src_schema => '&username',
                    stab       => '&tab_name');
Run Code Online (Sandbox Code Playgroud)

我收到这些错误:

SQL> execute util.verify(src_schema => '&username',
BEGIN util.verify(src_schema => 'u1',; END;

                                     *
ERROR at line 1:
ORA-06550: line 1, column 57: 
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current exists max min prior sql stddev
sum variance execute forall merge time timestamp interval
date <a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively


SQL>                   stab       => '&tab_name',
SP2-0734: unknown command beginning "stab      ..." - rest of line ignored.
Run Code Online (Sandbox Code Playgroud)

看起来我不能打破之间的电话,.如何以多行编写此调用?

Ron*_*nis 11

在SQLPlus中,您将破折号放在下一行继续的行的末尾.

execute util.verify(src_schema => '&username', -
                    stab       => '&tab_name');
Run Code Online (Sandbox Code Playgroud)

更新:添加了文档链接

EXECUTE,SQL*Plus®用户指南和参考


ber*_*d_k 6

还有另一种方法,如下所示:

begin
    util.verify(src_schema => '&username',
                    stab       => '&tab_name');
end;
/
Run Code Online (Sandbox Code Playgroud)


Cod*_*odo 5

execute xxxx;(或exec xxxx;)是写作的捷径begin xxxx; end;

它仅适用于一个衬垫.因此,如果您有多行,则需要明确使用beginend.