Creating a Sequence

Note

This feature is not available for MySQL database services.
You can create or edit a sequence in SQL Worksheet.

To create a sequence for a selected schema, in the Navigator tab, select Sequences from the object type drop-down list, click Object submenu, and select Create Object.

To edit a sequence for a selected schema, right-click a sequence object in the Navigator tab and select Edit.

Properties pane

  • Schema: Database schema in which to create the sequence.

  • Name: Name of the sequence.

  • Start with: Starting value of the sequence.

  • Increment: Interval between successive numbers in a sequence.

  • Min value: Lowest possible value for the sequence. The default is 1 for an ascending sequence and -(10^26) for a descending sequence.

  • Max value: Highest possible value for the sequence. The default is 10^27 for an ascending sequence and -1 for a descending sequence.

  • Cache and Cache size: Cache causes sequence values to be preallocated in cache, which can improve application performance. Cache size indicates the number of sequence values preallocated in cache. No Cache causes sequence values not to be preallocated in cache.

  • Cycle: Indicates whether the sequence "wraps around" to reuse numbers after reaching its maximum value (for an ascending sequence) or its minimum value (for a descending sequence). If cycling of values is not enabled, the sequence cannot generate more values after reaching its maximum or minimum value.

  • Order: Indicates whether sequence numbers are generated in the order in which they are requested. If No Order is specified, sequence numbers are not guaranteed to be in the order in which they were requested.