4

I have a rating system that ranges from -1 to 5 through 0.

So i need to store the following values

-1
0
1
2
3
4
5

Which is the best data type considering i want to fetch a total count of each value (not sum) ?

Harsha M V
  • 54,075
  • 125
  • 354
  • 529

1 Answers1

6

I'd go with TINYINT, documented here. It takes 1 byte of storage and its range is -128 to 127.

Ed Gibbs
  • 25,924
  • 4
  • 46
  • 69