ORACLE1.8-序列

create table test1111(

   id number(10) primary key,

   username varchar2(100)

);

create sequence myseq;

 

select myseq.nextval from dual

select myseq.currval from dual

 

select * from test1111;

 

insert into test1111(id,username) values(myseq.nextval,'小明');

insert into test1111(id,username) values(myseq.nextval,'小芳');

commit;

select * from test1111;

posted @ 2018-03-09 15:10  我喜欢空格键  阅读(128)  评论(0编辑  收藏  举报