Log on to OceanBase Developer Center (ODC) and click the name of the target connection in Oracle mode to go to the corresponding connection management page. You can click Sequence in the left-side navigation pane to get a list of sequences. To create a sequence, click + in the upper-right corner of the sequence list or click Create in the navigation bar on the top of the page. Perform the following two steps to create a sequence:
Set the Basic Informaation : You need to be specify Sequence Name and User . The User parameter is automatically specified based on the current account.
Set columns : This step is optional. You need to specify the following parameters to set columns:
| Parameter | Description |
|---|---|
| From | Specifies the initial value of the sequence, which must not be less than the value of Minimum Value . |
| Increment | Specifies the step size for the auto-increment of sequence values. The value can be a negative number. |
| Minimum Value | Specifies the minimum value that can be obtained by the sequence. The minimum value supported by the database is -1026. |
| Maximum Value | Specifies the maximum value that can be obtained by the sequence. The maximum value supported by the database is 1027. |
| Cache Settings | Specifies the cache size for the sequence. A proper cache size can improve the performance in obtaining sequence values. You can also set the value to No Cache . |
| Whether to Sort | Specifies whether the sequence obtains values in an ordered manner. The performance of the sequence in obtaining values in an ordered manner is inferior to that in an unordered manner. |
| Cyclic or Not | Specifies whether to start from the minimum value again when the sequence value reaches the maximum value. |
Click Commit in the Set columns section. An SQL script is pre-generated based on the specified information. After you confirm that the SQL script is error-free, click Execute to execute the script and generate the sequence.