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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ALTER DATABASE SET PRO_ENABLE_64BIT_SEQUENCES 'Y'<br />

2<br />

• If large keys are already enabled, an error message indicating such will be returned when<br />

you use the statement.<br />

ALTER DATABASE SET PRO_ENABLE_64BIT_SEQUENCES 'Y'<br />

Syntax<br />

This statement is used to enable large index keys in a database.<br />

Notes • You must have <strong>SQL</strong> DBA privileges to enable 64-bit sequences.<br />

ALTER SEQUENCE<br />

Syntax<br />

ALTER DATABASE SET PRO_ENABLE_64BIT_SEQUENCES 'Y'<br />

• As of OpenEdge Release 10.1B, OpenEdge databases support sequences with 64-bit<br />

maximums for positive and negative numbers.<br />

• In releases 10.1B and later, this feature is enabled by default. However, in Releases 10.1A<br />

and earlier, this specific ALTER DATABASE statement must be used to enable 64-bit<br />

sequences.<br />

• If 64-bit sequences are already enabled, an error message indicating such will be returned<br />

when you use the statement.<br />

The ALTER SEQUENCE statement can be used to change the current value of an existing sequence.<br />

The sequence can be in the current schema or a schema can be specified.<br />

ALTER SEQUENCE [schema_name.]sequence_name SET<br />

{ START WITH value | INCREMENT BY value |MAXVALUE value | NOMAXVALUE |<br />

MINVALUE value |NOMINVALUE | CYCLE | NOCYCLE | CURRVAL value };<br />

schema_name<br />

Specifies the schema name that contains the sequence. If this is not specified, OpenEdge<br />

<strong>SQL</strong> drops the sequence, if present, from the current schema.<br />

sequence_name<br />

Specifies the sequence to be dropped.<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.

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

Saved successfully!

Ooh no, something went wrong!