DEV Community

Max Angelo Perin (ᜋᜃᜐ)
Max Angelo Perin (ᜋᜃᜐ)

Posted on

Answer: how to increment integer Columns value by 1 in SQL

To add one to every value in the table...

UPDATE myTable
SET ID = ID + 1

To create a new value, one more then the previous highest (usually), use a column with IDENTITY

Discussion (0)