Oracle Aqua Data Studio中的PL/SQL错误

Oracle Aqua Data Studio中的PL/SQL错误,oracle,plsql,Oracle,Plsql,我正在尝试在Aqua Data Studio 8.0.22中执行下一个代码: -- Add a new role for cashier. declare roleEntityID "Entity"."EntityID"%type; begin select "EntityID_SEQ".NEXTVAL into roleEntityID from dual; insert into "Entity" ("EntityID") values(roleEntityID)

我正在尝试在Aqua Data Studio 8.0.22中执行下一个代码:

--  Add a new role for cashier.
declare 
    roleEntityID "Entity"."EntityID"%type;
begin
    select "EntityID_SEQ".NEXTVAL into roleEntityID from dual;
    insert into "Entity" ("EntityID") values(roleEntityID);
    insert into "Role" ("RoleID", "Name", "DisplayName") values (roleEntityID, 'Cashier', 'Cashier');
end;
但不幸的是,我有一些错误,首先是:

[错误]脚本行:1-3-----------------ORA-06550:第3行,第41列:PLS-00103:在 应满足以下条件之一:

:=;非空范围默认字符脚本第3行,语句 第3行第41栏


尝试删除引号。根本不知道为什么要将它们放在那里

根据脚本的运行方式,可能需要以正斜杠结束PLSQL块:

declare
--...
begin
--...
end;
/
并向您展示您的代码应该与Oracle 11GR2上的代码完全相同;SQLDeveloper的脚本输出显然没有在create或select语句后显示分号,也没有在结束后的行上显示斜杠;但所有这些都存在于原始缓冲区中:

> create sequence "EntityID_SEQ"
sequence "EntityID_SEQ" created.
> create table "Entity"("EntityID" number)
table "Entity" created.
> create table "Role"("RoleID" number, "Name" varchar2(30), "DisplayName" varchar2(30))
table "Role" created.
> declare 
    roleEntityID "Entity"."EntityID"%type;
begin
    select "EntityID_SEQ".NEXTVAL into roleEntityID from dual;
    insert into "Entity" ("EntityID") values(roleEntityID);
    insert into "Role" ("RoleID", "Name", "DisplayName") values (roleEntityID, 'Cashier', 'Cashier');
end;
anonymous block completed
> select * from "Entity"
EntityID               
---------------------- 
1                      

 1 rows selected 

> select * from "Role"
RoleID                 Name                           DisplayName                    
---------------------- ------------------------------ ------------------------------ 
1                      Cashier                        Cashier                        

 1 rows selected 

双引号强制所有对象名称表、列和序列区分大小写。如果它们是用引号创建的,他需要保留它们。如果问题出在他们身上,他不会得到ORA-06550;这将是一个ORA-00942:表或视图不存在或ORA-02289:序列不存在