Updating oracle table sequence

Rated 3.80/5 based on 615 customer reviews

We can not delete the existing data, we need to add the batch id for each record.

updating oracle table sequence-58

I have a table with date column, based on minimum date I need to generate a number.

will set the current sequence value to the max(pk) of your table (i.e. Bad side : this solution prints max(pk) rows of output, i.e.

the next call to NEXTVAL will give you the right result); if you use Toad, press F5 to run the statement, not F9, which pages the output (thus stopping the increment after, usually, 500 rows). is usually slower than the ALTER SEQUENCE solution.

You can also perform more complicated updates in Oracle.

You may wish to update records in one table based on values in another table.

Leave a Reply