sql - MySQL update bigint field -
how update mysql database bigint field?
currently our database has bigint(196605) field generating errors. pretty sure field limit 250 i.e. bigint(250) explains errors being generated.
the field stores integer values 3 digits e.g. 100, not sure why bigint. in case, need fix field without loss of data.
any appreciated!
this common confusion ... bigint
type has fixed size stored on 8b only difference between bigint(1)
, bigint(20
) number of digits gonna displayed 1 digit respectively 20 digits .
if store 3 digits numbers ,and not think need more can use smallint unsigned
type takes 2b instead of 8b save lot of space , performance increase.
i suggest read this first.
Comments
Post a Comment