Oracle Sequences

Posted jycjy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle Sequences相关的知识,希望对你有一定的参考价值。

Sequence: Define a Sequence to generate sequential numbers automatically

 

  example:可以在 update、select、insert语句中使用

  

SQL> ed
Wrote file afiedt.buf

  1  create sequence test_seq
  2  increment by 10
  3  start with 100
  4  maxvalue 200
  5  minvalue 110
  6  cycle
  7* nocache
SQL> /
create sequence test_seq
*
ERROR at line 1:
ORA-04006: START WITH cannot be less than MINVALUE

SQL> ed
Wrote file afiedt.buf
  1  create sequence test_seq
  2  increment by 10
  3  start with 120
  4  maxvalue 200
  5  minvalue 110
  6  cycle
  7* nocache
SQL> /
Sequence created.
SQL> select test_seq.nextval from dual;
   NEXTVAL
----------
       120

SQL> select test_seq.currval from dual

   CURRVAL
----------
       120

SQL> 

  

以上是关于Oracle Sequences的主要内容,如果未能解决你的问题,请参考以下文章

windows安装oracle76%卡了

oracle 语法

oracle 是怎么收费的?

oracle的数据怎么发送到接口

oracle 查版本号,oracle怎样查版本

如何下载oracle11g