| ACCESS类型 | MSSQL |
| 是否 | bit |
| 数字(字节) | tinyint |
| 数字(整型) | smallint |
| 数字(长整形) | int |
| 数字(单精度) | real |
| 数字(双精度) | float |
| 无等价类型 | bigint |
» 阅读全文
Submitted by shqzzy on 2009, March 27, 1:17 PM
| ACCESS类型 | MSSQL |
| 是否 | bit |
| 数字(字节) | tinyint |
| 数字(整型) | smallint |
| 数字(长整形) | int |
| 数字(单精度) | real |
| 数字(双精度) | float |
| 无等价类型 | bigint |
» 阅读全文
Submitted by shqzzy on 2008, August 13, 11:12 AM
今天在设计数据库的时候遇到一个 三个选项 组合选择的结果保存的问题。
一开始想用 字符串分隔的方式。
后来想想是不是可以用 int字段。
于是向lamking 请教一下。他说用数字电路 二进制的思路可以解决。
» 阅读全文
Submitted by shqzzy on 2007, September 28, 10:46 AM
mysql 数字类型的 int(3)或int(1) 其中括号数字表示什么.
官方有一段话:
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 is used to display integer values having a width less than the width specified for the column by left-padding them with spaces.
The display width does not constrain the range of values that can be stored in the column, nor the number of digits that are displayed for values having a width exceeding that specified for the column. For example, a column specified as SMALLINT(3) has the usual SMALLINT range of -32768 to 32767, and values outside the range allowed by three characters are displayed using more than three characters.
When used in conjunction with the optional extension attribute ZEROFILL, the default padding of spaces is replaced with zeros. For example, for a column declared as INT(5) ZEROFILL, a value of 4 is retrieved as 00004. Note that if you store larger values than the display width in an integer column, you may experience problems when MySQL generates temporary tables for some complicated joins, because in these cases MySQL assumes that the data fits into the original column width.
» 阅读全文