首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

pl/sql accept命令解决方案

2011-12-29 
pl/sql accept命令SQL codeset serveroutput onaccept anum number prompt input a number:beginif anum

pl/sql accept命令

SQL code
set serveroutput onaccept anum number prompt 'input a number:'beginif anum > 100 then     DBMS_OUTPUT.PUT_LINE('bigger');ELSEIF anum = 100 then    DBMS_OUTPUT.PUT_LINE('same');else    DBMS_OUTPUT.PUT_LINE('smaller'); end if;end;/



SQL> @1
input a number:1
ELSEIF anum = 100 then
  *
ERROR at line 4:
ORA-06550: line 4, column 8:
PLS-00103: Encountered the symbol "ANUM" when expecting one of the following:
:= . ( @ % ;
ORA-06550: line 9, column 4:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
if


[解决办法]
ELSEIF错误,应该是ELSIF

热点排行