前端之家收集整理的这篇文章主要介绍了
Oracle-序列、索引和同义词,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
序列
create sequence empseq
increment by 10
start with 10
maxvalue 100
cycle
nocache
select sequence_name,min_value,max_value,increment_by,last_number
from user_sequences
select empseq.nextval from dual
select empseq.currval from dual
alter sequence empseq
increment by 1
nocycle
nocache
insert into emp01
values(empseq.nextval,'AA',5500)
索引和同义词
create index emp01_id_ix on emp01(employee_id) --删除索引 drop index emp01_id_ix; create synonym e for employees select * from e --删除同义词 drop synonym e;
原文链接:https://www.f2er.com/oracle/212252.html