1.新建表结构
<span >create table tb_user (
userId INTEGER not null,
userName CHAR(20),
constraint PK_TB_USER primary key (userId)
)</span>
2.新建自增序列
<span >create sequence tb_user_id
increment by 1
start with 0
maxvalue 10000
minvalue 0
nocycle
cache 20
order;</span>
3.插入数据
<span >insert into tb_user(userId,userName) values(tb_user_id.nextval,'刘云生')</span>