2 Day Developer > Managing Database Objects > Managing Sequences > Creating a Sequence
Creating a Sequence |
Previous |
Next |
You can use the Object Browser page to create a sequence.
To create a sequence:
Log in to the Database Home Page. See "Logging in to the Database Home Page".
On the Database Home Page, click the Object Browser icon.
In the Detail pane, select Sequence from the Create menu.
In the Sequence Name field, enter the name of the new sequence (my_sequence
).
In the Start With field, enter 1000
. This starts the sequence with a value of 1000.
For the other fields on the page, use the default values. Click the Next button.
Click the SQL button to view the SQL statement that creates this sequence.
Click the Finish button to create the sequence.
After creating and initializing a sequence, you can access and use the current value of the sequence. For an example of the use of a sequence in a SQL statement to insert data into a table, see Example: Creating a Sequence Using SQL.