Limit for auto_increment

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
my_raj_raj2
Forum Commoner
Posts: 28
Joined: Mon Mar 20, 2006 8:06 am
Location: India

Limit for auto_increment

Post by my_raj_raj2 »

Hi all,

I set auto_increment for int data type.

Any limit for that auto_increment?? If it reaches that value then what happens??

Thx in advance.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Limit for auto_increment

Post by Kieran Huggins »

it will auto increment until it reaches the limit of the var type for that column, then I believe you'll get an error. The MySQL docs would likely say for sure.

Just use a big integer and you'll never have to worry.
my_raj_raj2
Forum Commoner
Posts: 28
Joined: Mon Mar 20, 2006 8:06 am
Location: India

Re: Limit for auto_increment

Post by my_raj_raj2 »

Thanks Kieran Huggins.

I will change it to Big integer
Post Reply