sql中smallint是什么意思 smallint怎么使用 smallint 数据类型的一种。 smallint的功能: 需要 2 个字节存储的整数。 语法: [ unsigned ] smallint smallint的用法: smallint 数据类型是一种精确数值数据类型,其精度在算术运算后不变。它需要 2 个字节存储。 有符号的 smallint 值的范围是 –2^15(2^15表示2的15次幂) 到2^15 – 1,即 –32768 到 32767。 无符号的 smallint 值范围是 0 到 2^16 – 1,即 0 到 65535。 int 是4字节数据,取值范围 -2^31 - 2^31,所以在考虑最大数据范围的前提下,优先使用smallint类型。 标准和兼容性: ·sql/92 与 sql/92 兼容。unsigned 关键字是供应商扩展。 ·sybase 带符号的数据类型与 adaptive server enterprise 兼容。adaptive server enterprise 不支持 unsigned 数据类型。 另参见: int 或 integer 数据类型 [numeric] tinyint 数据类型 [numeric] bigint 数据类型 [numeric] |

