Updated on 2022-08-16 GMT+08:00

Creating Sequence

Follow the steps below to create a sequence:

  1. In the Object Browser pane, right-click Sequences under the particular schema where you want to create the sequence and select Create Sequence.

    The Create New Sequence dialog box is displayed.

  2. Provide information to create a sequence:

    1. Enter a name in the Sequence Name field.

      Select the Case check box to retain the capitalization of the text entered in Sequence Name field. For example, if the sequence name entered is "Employee", then the sequence name is created as "Employee".

    2. Enter the minimum value in the Minimum Value field.
    3. Enter the increase step value in the Increment By field.
    4. Enter maximum value in the Maximum Value field.

      The minimum and maximum value should be between -9223372036854775808 and 9223372036854775807.

    5. Enter the start value of the sequence in Start Value field.
    6. Enter the cache information in Cache field. The cache value denotes the number of sequences stored in the memory for quick access.
    7. Select the Cycle field to recycle sequences after the number of sequences reaches either the maximum or minimum value.

      The schema name auto-populates in the Schema field.

    8. Select the table from the Table drop-down list.
    9. Select the column from the Column drop-down list.

  3. Click Finish.

    The status bar displays the status of the completed operation.

    In the SQL Preview tab, you can view the SQL query automatically generated for the inputs provided.