Previous
Previous
 
Next
Next

Creating a Sequence

To create a sequence:

  1. On the Workspace home page, click SQL Workshop and then Object Browser.

    Object Browser appears.

  2. Click Create.

  3. From the list of object types, select Sequence.

  4. Specify the following and click Next:

    • Sequence Name - Enter the name of the sequence.

    • Preserve Case - To have the final sequence name match the case entered in the Sequence Name field, click Preserve Case.

    • Start With - Enter the number of the first sequence. The first reference to sequence_name.nextval returns this number.

    • Minimum Value - Enter the minimum value this sequence can return.

    • Maximum Value - Enter the maximum value this sequence can return.

    • Increment By - Each call to sequence_name.nextval will return a value greater than the last, until the maximum value is reached. Enter the value used to increment to the next sequence number.

    • Cycle - Select this option to restart the sequence number to the minimum value when the maximum value is reached. This is not recommended if using the sequence for primary key creation.

    • Number to Cache - For faster access, specify how many sequence values are stored in memory.

    • Order - Specify ORDER to guarantee that sequence numbers are generated in order of request. This option is necessary if using Real Application Clusters (Oracle RAC).

    A confirmation page appears.

  5. Click Create.