Creating a sequence generator

Procedure

  1. Log on to the NonStop SQL/MX Database Manager.
  2. In the navigation tree, navigate to the Schemas folder by expanding Database > My Systems > Catalogs > Schemas.
  3. Right-click on the Sequences folder and select Create Sequence.

    The Create Sequence wizard appears.

    Create Sequence wizard

    The sequence generator is created in the schema from where the Create Sequence wizard is launched. To create a sequence generator in a different catalog or schema, select another catalog and schema from the navigation tree displayed in the Schema section in the General Properties tab.

  4. Click General Properties tab.For more information, see Sequence generator attributes.
    • Enter the name of the sequence in the Name box.

    • Set the following attributes as desired:

      • Data Type—The supported data types are numeric, integer, large integer, and small integer.
      • Unsigned
      • Precision—The Precision option is displayed if you select Numeric in Data Type.
      • Start With
      • Increment By
      • Minimum Value
      • Maximum Value
      • No Cycle/Cycle
  5. In the Location tab, select the system and volume name where the sequence generator must reside.

    You can let SQL/MX determine the name of the physical file for the sequence generator or enter the file name in the text box in the File Name section. This option is enabled after you select the system and volume name.

  6. Click Create.