我正在尝试创建一个触发器,但不知何故我收到了错误,称为错误绑定变量。我在谷歌上搜索了它,但在所有情况下,我都得到了相同的答案,即用户试图用错误的列名创建触发器。这是我的脚本。
CREATE TABLE "POPSETTING"
( "settingid" number primary key,
"HOSTNAME" VARCHAR2(50),
"INCOMINGSERVER" VARCHAR2(100),
"REQUIREDSSL" VARCHAR2(1),
"PORT" NUMBER,
"OUTGOINGSERVER" VARCHAR2(100),
"REQUIREDTLS" VARCHAR2(1),
"REQUIREDAUTH" VARCHAR2(1),
"PORTTLS" NUMBER,
"PORTSSL" NUMBER
)
序列:
create sequence auto_inc start with 1 increment by 1 nomaxvalue
扳机:
create or replace trigger popid
before insert on popsetting
for each ROW
begin
select auto_inc.NEXTVAL
into :new.settingid from dual
end;
/
请让我知道我的错误。