我正在运行以下脚本 -
DECLARE
new_vendor_id vendors5.vendor_id%TYPE;
new_invoice_id invoices5.invoice_id%TYPE;
current_date DATE := SYSDATE;
due_date DATE := SYSDATE+30;
iterator NUMBER := 1 ;
输出:
Error report -
ORA-06550: line 6, column 34:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
begin function pragma procedure subtype type <an identifier>
<a double-quoted delimited-identifier> current cursor delete
exists prior
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
请告诉我我做错了什么。我试图更改为NUMBER(1),但它有同样的错误。
答案 0 :(得分:2)
如果这是整个脚本,那么应该抛出错误。每个块都需要包含至少三个元素。
BEGIN -- Execution start
NULL; -- A statement (even if it doesn't do anything)
END; -- Ends and executes the block.
/
可选的DECLARE
部分会超出BEGIN
,但不能单独使用。完成对块的编码,将解决此特定错误。