在oracle中执行sql语句如下,发现警告:创建的触发器带有编译错误,求指教!!!
createsequence"Sequence_APP"incrementby1startwith1/createtableAPP(AIDNUMBER(20)notnul...
create sequence "Sequence_APP"
increment by 1
start with 1
/
create table APP (
AID NUMBER(20) not null,
AKEY VARCHAR2(100) not null,
AREMARK VARCHAR2(1000),
constraint PK_APP primary key (AID)
)
/
create unique index "Index_APP" on APP (
AKEY ASC
)
/
create trigger "tib_app" before insert
on APP for each row
declare
integrity_error exception;
errno integer;
errmsg char(200);
dummy integer;
found boolean;
begin
-- Column "AID" uses sequence Sequence_APP
select Sequence_APP.NEXTVAL INTO :new.AID from dual;
-- Errors handling
exception
when integrity_error then
raise_application_error(errno, errmsg);
end;
/ 展开
increment by 1
start with 1
/
create table APP (
AID NUMBER(20) not null,
AKEY VARCHAR2(100) not null,
AREMARK VARCHAR2(1000),
constraint PK_APP primary key (AID)
)
/
create unique index "Index_APP" on APP (
AKEY ASC
)
/
create trigger "tib_app" before insert
on APP for each row
declare
integrity_error exception;
errno integer;
errmsg char(200);
dummy integer;
found boolean;
begin
-- Column "AID" uses sequence Sequence_APP
select Sequence_APP.NEXTVAL INTO :new.AID from dual;
-- Errors handling
exception
when integrity_error then
raise_application_error(errno, errmsg);
end;
/ 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |