user2110156
user2110156

Reputation: 13

column value not exceeding 255 in mysql

I'm facing a slight problem. I have a primary key ID in a table set on autoincrement which is not allowing any value over 255 to be set. How should I go about fixing this? The higher the value which can be set, the better it is for me :)

Upvotes: 0

Views: 112

Answers (1)

Devart
Devart

Reputation: 121902

It looks like you use TINYINT(4) UNSIGNED, the maximum value in this case is 255. Try to change the type of ID column, e.g. -

ALTER TABLE table
  CHANGE COLUMN id id INT(11) UNSIGNED NOT NULL;

Upvotes: 2

Related Questions