Oracle数字类型number自增的实现代码
废话不多说了,直接给大家贴代码了,具体代码如下所示:
创建序列
create sequence seq_student start with 6 increment by 1 maxvalue 500 nominvalue nocycle nocache;
创建触发器
create or replace trigger trigger_student before insert on student for each row declare BEGIN select seq_student.nextval into :new.id from dual; END;
总结
相关推荐
Chriswang 2020-04-30
donghongbz 2020-01-18
leonranri 2016-12-09
workflow 2013-08-15
stingfire 2012-05-16
itwxming 2015-09-02
周健华 2019-06-28
donghongbz 2011-10-12
去山中嘘嘘 2015-01-21
Awara 2019-06-27
小肖 2014-05-19
mxcsdn 2010-10-20
adeyi 2019-06-21
咸鱼 2012-10-28
greensomnuss 2012-10-09
Gcalolin 2019-06-20
愚盦 2011-05-24
每天积累一点点 2011-03-08
Lucianoesu 2018-10-27