create table bbs_class (
cid number primary key, --版面id,自增
title varchar2(30) not null --版面名称
);--bbs_class 中cid 序列
CREATE SEQUENCE cid_seq
INCREMENT BY 1
START WITH 1
NOMAXVALUE
NOCYCLE
NOCACHE;--bbs_class 中cid触发器
create or replace trigger cid_trig
before insert on bbs_class for each row
begin
if inserting then
select cid_seq.nextval into:new.id from dual;
end if;
end;
/然后创建触发器时报:Warning: Trigger created with compilation errors,用时报:触发器无效!
cid number primary key, --版面id,自增
title varchar2(30) not null --版面名称
);--bbs_class 中cid 序列
CREATE SEQUENCE cid_seq
INCREMENT BY 1
START WITH 1
NOMAXVALUE
NOCYCLE
NOCACHE;--bbs_class 中cid触发器
create or replace trigger cid_trig
before insert on bbs_class for each row
begin
if inserting then
select cid_seq.nextval into:new.id from dual;
end if;
end;
/然后创建触发器时报:Warning: Trigger created with compilation errors,用时报:触发器无效!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货