CREATE SEQUENCE command
PURPOSE:
To create a sequence. A sequence is a database object from which
multiple users may generate unique integers. You can use sequences
to automatically generate primary key values.
SYNTAX:
CREATE SEQUENCE [schema.]sequence
[INCREMENT BY integer]
[START WITH integer]
[MAXVALUE integer | NOMAXVALUE]
[MINVALUE integer | NOMINVALUE]
[CYCLE | NOCYCLE]
[CACHE integer | NOCACHE]
[ORDER | NOORDER]
where:
schema
is the schema to contain the sequence. If you omit schema, Oracle
creates the sequence in your own schema.
sequence
is the name of the sequence to be created.
INCREMENT BY
specifies the interval between sequence numbers. This value can be
any positive or negative Oracle integer, but it cannot be 0. If
this value is negative, then the sequence descends. If the
increment is positive, then the sequence ascends. If you omit this
clause, the interval defaults to 1.
MINVALUE
specifies the sequence’s minimum value.
NOMINVALUE
specifies a minimum value of 1 for an ascending sequence or -10
for a descending sequence.
The default is NOMINVALUE.
MAXVALUE
specifies the maximum value the sequence can generate.
相关文章
Oracle连接远程数据库并远程执行DDL操作
Oracle中Decode()函数的使用方法
Oracle的随机数、随机日期和时间、随机字符串
Oracle中一些基础参数的设置
Oraclesequence的order_noorder选项
oracle删除,修改主健_外键代码
Oracle频繁归档问题解决办法
oracle数据库命令行导入导出方法
Oracle面试试题及答案
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛