为什么我在 Oracle SQL 中收到 PSL-00103 错误?
Why am I receiving the PSL-00103 Error in Oracle SQL?
我正在尝试创建一个过程,将一行插入到 Oracle SQL 中的 table 中。但是,当我编写任何类型的过程时,我都无法找出存在此问题的可靠原因。
我试过几次更改语法,但我仍然不知道如何解决这个问题。
给出的错误:
Error at line 1: PLS-00103: Encountered the symbol ")" when expecting one of the following: in out table ... columns long double ref char time timestamp interval date binary national character nchar
Error at line 5: PL/SQL: SQL Statement ignored Error at line 6: PL/SQL: ORA-00984: column not allowed here
代码:
create or replace procedure insert_category(
category_name_param in categories.category_name%type)
as
begin
insert into categories (category_id, category_name)
values (category_id, category_name_param);
end;
程序好像还少了一个参数;看看这是否有帮助(我 推测 table 中存在这样的列;不能确定,因为你没有 post table说明):
create or replace procedure insert_category(
category_name_param in categories.category_name%type,
category_id_param in categories.category_id%type --> this
)
as
begin
insert into categories
(category_id,
category_name)
values
(category_id_param, --> this
category_name_param);
end;
我正在尝试创建一个过程,将一行插入到 Oracle SQL 中的 table 中。但是,当我编写任何类型的过程时,我都无法找出存在此问题的可靠原因。
我试过几次更改语法,但我仍然不知道如何解决这个问题。
给出的错误:
Error at line 1: PLS-00103: Encountered the symbol ")" when expecting one of the following: in out table ... columns long double ref char time timestamp interval date binary national character nchar
Error at line 5: PL/SQL: SQL Statement ignored Error at line 6: PL/SQL: ORA-00984: column not allowed here
代码:
create or replace procedure insert_category(
category_name_param in categories.category_name%type)
as
begin
insert into categories (category_id, category_name)
values (category_id, category_name_param);
end;
程序好像还少了一个参数;看看这是否有帮助(我 推测 table 中存在这样的列;不能确定,因为你没有 post table说明):
create or replace procedure insert_category(
category_name_param in categories.category_name%type,
category_id_param in categories.category_id%type --> this
)
as
begin
insert into categories
(category_id,
category_name)
values
(category_id_param, --> this
category_name_param);
end;