Ask Your Question

Base auto value Integer is negative [closed]

asked 2014-02-07 02:21:45 +0200

Phage gravatar image


I have created tables and assigned a field with auto value. It used to start with 1 and incremented. However at some point it started to put IDs such as, -2147483646 -2147483645 ... -2147483641 etc...

Why is it using negative values all of a sudden? How can I fix this issue?

Thanks a lot!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-19 07:01:19.521511

1 Answer

Sort by » oldest newest most voted

answered 2014-02-08 03:00:19 +0200

Phage gravatar image

I have found a solution by setting the index increment value with following command: ALTER TABLE "

" ALTER COLUMN ID (I also had a column called ID which was the auto inc. identifier) RESTART WITH 5 (this last number should be 1 bigger than the biggest id in the table)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-02-07 02:21:45 +0200

Seen: 210 times

Last updated: Feb 08 '14