MySQL int definition explanation -


for years have been under assumption when create new column of type bigint(12) mysql table field limited integers 12 digits. however, noticed values 16 digits able written , selected out of bigint(12) defined column without warnings or issues.

can please me understand why case , column definition means? in advance!

bigint(12) not truncated @ all. 12 used display purposes.

have @ numeric types

numeric type attributes

mysql supports extension optionally specifying display width of integer data types in parentheses following base keyword type. example, int(4) specifies int display width of 4 digits. optional display width may used applications display integer values having width less width specified column left-padding them spaces. (that is, width present in metadata returned result sets. whether used or not application.)

the display width not constrain range of values can stored in column. nor prevent values wider column display width being displayed correctly.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -