日期:2014-05-16 浏览次数:20656 次
create sequence sq_blog_info
start with 1
increment by 1
nomaxvalue
nocycle
cache 10;create or replace trigger tg_blog_info
before insert on blog_info for each row
begin
select sq_blog_info.nextval into :NEW.id from dual; --★注意: 此处的;是必须的
end;insert into blog_info (title) values('a');