How to Update an Oracle Sequence
An Oracle sequence lets you auto-generate a new numeric value in your database tables. The sequence automatically increments each time you insert a new record. Oracle lets you define the start number for the sequence, the ending number and the numeric value by which the number increments each time a new record inserts. Edit the sequence using the Oracle PL-SQL "alter" statement.
Instructions
-
-
1
Open your Oracle Enterprise Manager software in the Windows program menu and log in to your database server. Open the PL-SQL editor in the management console.
-
2
Create the alter PL-SQL code. The following code shows you how to alter a sequence's increment number:
alter sequence mysequence INCREMENT BY 5;
This code edits the sequence "mysequence" and changes the increment number to 5.
-
-
3
Click the "Run" button to execute the alter statement. The changes take effect immediately, and the Enterprise software replies with a success message.
-
1