Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Collation is the best for data type INT in MySQL?

When a filed is INT(data type), what should I choose as collation in MySQL?

like image 865
Steven Avatar asked Dec 19 '09 09:12

Steven


2 Answers

Collation affects string sorting. It doesn't have any effect on numeric data types.

It may, howevever, have an effect on how numbers embedded in strings are sorted. But that's still no effect on numeric data types such as INT.

like image 182
Joey Avatar answered Oct 24 '22 10:10

Joey


As far as I know, you can specify a collation (or a character set for that matter) only for string types, ie. the types VARCHAR, CHAR, ENUM, SET, and TEXT types (TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT)

like image 25
Roland Bouman Avatar answered Oct 24 '22 11:10

Roland Bouman