--创建序列
create sequence empseq
increment by 10---每次增长10
start with 10--从10开始
maxvalue 100--提供最大值
cycle --循环
nocache --不需要缓存登录
运行结果
--查看 查看
select empseq.nextval from dual
运行结果
--创建表
create table emp11
as
select employee_id,last_name,salary
from employees
where 1=2--插入表
insert into emp11
values(empseq.nextval,'BB',1000)--查询
select * from emp11
查询
--修改
alter sequence empseq
increment by 1---每次增长10
--start with 10--从10开始
--maxvalue 100--提供最大值
nocycle --循环
nocache --
运行结果‘
’
--手动创建索引
create index emp11_index
on emp11(employee_id)
运行结果