我已经在SQL Plus中接受命令的问题。我不知道我做错了什么 - 所有的时间得到它说的错误:“出现符号”。“在需要下列之一时:” 有人吗? 在此先感谢。命令接受SQL加
select concat('poid_id: ',poid_id0) from przykladowa3 ;
set serveroutput ON;
declare
begin
DBMS_OUTPUT.PUT_LINE('Czy usuwamy? T/N');
end;
/
set scan on;
declare
mark char;
cursor cur is select * from przykladowa3;
rowtype cur%rowtype;
begin
ACCEPT mark char PROMPT 'Enter smth: '
open cur;
if (mark='T') THEN
loop
fetch cur into rowtype;
exit when cur%notfound;
delete from przykladowa3 where poid_id0=rowtype.poid_id0;
DBMS_OUTPUT.PUT_LINE('Successfully removed: ' || rowtype.poid_id0);
commit;
end loop;
else
DBMS_OUTPUT.PUT_LINE('SOME TEXT');
end if;
end;
/
错误:
ORA-06550: linia 6, kolumna 8:
PLS-00103: Encountered the symbol "MARK" when expecting one of the following:
:= . (@ % ;
能否请您附上错误讯息? –
hello agent5566。 ::错误消息:ORA 06550:linia 6,kolumna 8: PLS-00103:在需要下列之一时出现符号 “标记”=。 (@%; – maciek2791
首先,你应该设置'mark'数据类型的长度,例如'char(1)',你也在混合pl \ sql和sqlplus代码。 SQL。 –