2.建立序列
-- Create sequence
create sequence SEQ_SHIP_IMAGE
minvalue 20
maxvalue 999999999999999999
start with 40
increment by 1
cache 20;
使用序列:
SELECT SEQ_SHIP_IMAGE.Nextval from dual;
insert into ship_image (id,img_path,remark,ship_id) values (SEQ_SHIP_IMAGE.Nextval,‘ship3.jpg‘,‘8‘,‘8‘);
或者
insert into user(id, name, password, age, deleteFlag)
values(#{id}, #{name}, #{password}, #{age}, #{deleteFlag})
oracle数据库建立序列、使用序列实现主键自增
标签:_id let 使用 key before enc values ora selectkey
本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉
本文系统来源:http://www.cnblogs.com/CESC4/p/7304941.html