建表范例

create table students(id varchar2(20) primary key,name varchar2(20),age varchar2(20),
score varchar2(20),updatetime date default sysdate)

select * from students

drop table student

 

--创建序列
create sequence seq_id
start with 1
increment by 1

drop sequence seq_id

insert into students values(seq_id.nextval,'aa','23','89',sysdate)
insert into students values(seq_id.nextval,'bb','27','91',sysdate)
insert into students values(seq_id.nextval,'cc','21','58',sysdate)
insert into students values(seq_id.nextval,'dd','51','99',sysdate)

你可能感兴趣的:(Oracle 序列)