23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CREATE SEQUENCE<br />

18<br />

schema_name<br />

Specifies the schema to contain the sequence. If schema_name is not specified, the<br />

sequence generator creates the sequence in the current schema. OpenEdge supports only<br />

the PUBLIC (PUB) schema.<br />

sequence_name<br />

Specifies the name of the sequence to be created.<br />

INCREMENT BY<br />

Specifies the interval between sequence numbers. The value can be a positive or negative<br />

integer (INTEGER data type for 32-bit sequences, BIGINT datatype for 64-bit sequences),<br />

but cannot be 0. The value range for a 32-bit sequence is from -2,147,483,648 to<br />

2,147,483,647. The value range for a 64-bit sequence is from -9223372036854775808 to<br />

9223372036854775807. If value is positive, the sequence ascends. If it is negative, the<br />

sequence descends. The default value is 1.<br />

START WITH<br />

MAXVALUE<br />

Specifies the first sequence number generated. In an ascending sequence, the value must<br />

be greater than or equal to the MINVALUE. In a descending sequence, the value must be<br />

greater than or equal to the MAXVALUE. For ascending sequences, the default value is<br />

MINVALUE. For descending sequences, the default value is MAXVALUE.<br />

Specifies the maximum value for the sequence to generate. For both 32-bit and 64-bit<br />

descending sequences, the default value is -1. For a 32-bit ascending sequence, the default<br />

value is 2,147,483,647. For a 64-bit ascending sequence, the default value is<br />

9223372036854775807.<br />

NOMAXVALUE<br />

Specifies -1 as the MAXVALUE for 32-bit descending sequences and 2,147,483,647 as the<br />

MAXVALUE for 32-bit ascending sequences. Specifies -1 as the MAXVALUE for 64-bit<br />

descending sequences and 9223372036854775807 as the MAXVALUE for 64-bit ascending<br />

sequences.<br />

MINVALUE<br />

Specifies the minimum value the sequence can generate. For an ascending sequence, the<br />

default value is 0. For a descending sequence, the default value is -2,147,483,648 for<br />

32-bit sequences and -9223372036854775808 for 64-bit sequences.<br />

NOMINVALUE<br />

CYCLE<br />

Specifies 0 as the MINVALUE for ascending sequences. The MINVALUE for descending<br />

sequences is -2,147,483,648 for 32-bit sequences and -9223372036854775808 for 64-bit<br />

sequences.<br />

Indicates that the sequence will continue to generate values after reaching the value<br />

assigned to MAXVALUE (if sequence ascends) or MINVALUE (if sequence descends).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!