Oracle ORA-06550:遇到“问题”;“文件结束”;应为以下内容时:。(;查询运行正常,但在块中给出错误

Oracle ORA-06550:遇到“问题”;“文件结束”;应为以下内容时:。(;查询运行正常,但在块中给出错误,oracle,plsql,Oracle,Plsql,查询在没有块的情况下可以正常工作。但是我在第3行第11列中得到文件末尾错误 表结构 人 create or replace procedure personWithGivenCity(city1 in varchar) as cursor c1 is select p.name from person p join address ad on p.name=ad.name wh

查询在没有块的情况下可以正常工作。但是我在
第3行第11列中得到
文件末尾
错误

表结构

create or replace procedure personWithGivenCity(city1 in varchar) as
cursor c1 is select p.name 
              from person p 
              join address ad 
              on p.name=ad.name 
              where ad.city=city1;
c c1%rowtype;
begin
    open c1;
    loop
        fetch c1 into c;
        exit when c1%notfound;
        dbms_output.put_line(c.name);
    end loop;
    close c1;
end;
/

-- Block which class the procedure
declare
    city varchar2(10):='Vasco';
begin
    personWithGivenCity(city);
end;
/
地址

name varchar2(10) primary key, 
gender varchar2(10), 
age number
错误

name varchar2(10) references person(name), 
hno number, 
laneno number, 
city varchar2(10), 
state varchar2(10)

这里的代码在本地运行良好。我在SQL fiddle上尝试了它,得到了上面的错误。当我使用Oracle SQL工作表执行此操作时,每一行都打印了两次。我不知道这个问题。代码在本地运行良好。我在SQL fiddle上尝试了它,得到了上面的错误。当我使用Oracle SQL工作表执行此操作时,每一行都打印了g两次。我不知道这个问题。
ORA-06550: line 3, column 11: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: . ( % ; for