[英]What is the correct syntax to break a PL/SQL procedure call in multiple lines?
我正在调用这样的PL / SQL过程:
execute util.verify(src_schema => '&username',
stab => '&tab_name');
我收到这些错误:
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.
貌似我不能打破在中之间的通话,
。 如何以多行编写此调用?
在SQLPlus中,您将破折号放在下一行继续的行的末尾。
execute util.verify(src_schema => '&username', -
stab => '&tab_name');
更新 :添加了文档链接
还有另一种方法,如下所示:
begin
util.verify(src_schema => '&username',
stab => '&tab_name');
end;
/
execute xxxx;
(或exec xxxx;
)是写作begin xxxx; end;
的捷径begin xxxx; end;
begin xxxx; end;
它仅适用于一个衬垫。 因此,如果您有多行,则需要明确使用begin
和end
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.