user889349 user889349 - 9 months ago 48
MySQL Question

Mysql - right data field type for list of integers

I want to store a set of integers in my column (ids_set):

id ids_set
1 1,2,3,4...76
2 4,5,8...12

What is a best field type for this - varchar or text?


Is better not store int separed by comma ..anyway depend of the lenght of your string ... below 255 char varchar, above is better text


char - varchar The length can be any value from 0 to 255.

BLOB, TEXT   2^16