永发信息网

数据库中执行PL/SQL的带名块,报错了,请帮忙看下是什么原因

答案:2  悬赏:80  手机版
解决时间 2021-02-04 21:45
  • 提问者网友:沉默菋噵
  • 2021-02-04 14:48
具体报错信息:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem
<> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
块的内容如下:
REM labeled.sql
REM Version 1.0, last updated 5/7/97
REM This script illustrates a labeled PL/SQL block, as described in
REM Chapter 2 of _Oracle8 PL/SQL Programming_ by Scott Urman.
delete from temp_table;
set serveroutput on

<>
DECLARE

v_Num1 NUMBER := 3;
v_Num2 NUMBER := 4;
v_String1 VARCHAr2(50) := 'Hello World!';
v_String2 VARCHAr2(50) := '-- This message brought to you by PL/SQL!';
v_OutputStr VARCHAr2(50);
BEGIN

INSERT INTO temp_table (num_col, char_col)
VALUES (v_Num1, v_String1);
INSERT INTO temp_table (num_col, char_col)
VALUES (v_Num2, v_String2);


SELECt char_col
INTO v_OutputStr
FROM temp_table
WHERe num_col = v_Num1;
DBMS_OUTPUT.PUT_LINE(v_OutputStr);

SELECt char_col
INTO v_OutputStr
FROM temp_table
WHERe num_col = v_Num2;
DBMS_OUTPUT.PUT_LINE(v_OutputStr);
commit;
END;
/
最佳答案
  • 五星知识达人网友:胯下狙击手
  • 2021-02-04 15:11
报错没有指明第几行第几列么?放在plsql dev里面运行下或sqltools。
还有你前面的这些信息我只看懂了delete,REM是么的意思哦。
REM labeled.sql
REM Version 1.0, last updated 5/7/97
REM This script illustrates a labeled PL/SQL block, as described in
REM Chapter 2 of _Oracle8 PL/SQL Programming_ by Scott Urman.
delete from temp_table;
全部回答
  • 1楼网友:你可爱的野爹
  • 2021-02-04 16:45

应该是数组超出限制值。

我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯