我一直在試圖運行此腳本,但我得到的是這樣的錯誤:出現符號「IS」期待之一,當以下
Error report:
ORA-06550: line 3, column 15:
PLS-00103: Encountered the symbol "IS" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp interval date binary national character
nchar
The symbol "IS" was ignored.
這裏是我的腳本:
set serveroutput on
DECLARE
cursor depts_cur is select dname from dept;
depts_cur_rec is depts_cur%type;
BEGIN
loop
fetch depts_cur into depts_cur_rec;
exit when depts_cur_rec%notfound;
dbms_output.put_line('Department: ' || depts_cur_rec);
end loop;
close depts_cur;
END;
您的幫助將不勝感激。
如果你讀了錯誤,它告訴你究竟是什麼錯誤:第3行是'depts_cur_rec是depts_cur%類型;';第15列是「IS」的地方。 – 2012-03-01 02:04:31