|
Another extension is supported by MySQL for optionally specifying the display width of integer data types in parentheses following the base keyword for the type (for example, INT(4)). This optional display width may be used by applications to display integer values having a width less than the width specified for the column by left-padding them with spaces. (That is, this width is present in the metadata returned with result sets. Whether it is used or not is up to the application.)
我开始以为INT(15)是表示能存储15个单位的数字呢,才发现这个15设置的根本就没有用,上面这段话我的理解是,15表示的是select的时候显示的数字,但是数据库里面实际存储的还是原始值而已。
不知道我理解的对不对呢? |
|