8.1.1. Integer Types

8.1.1. Integer Types
8.1.1.整数类型
The types smallint , integer , and bigint store whole numbers, that is, numbers without fractional  components, of various ranges. Attempts to store values outside of the allowed range will result  in an error. 
smallint,integer和bigint类型存储整数,即没有小数部分的数字,它们的范围是不同的。尝试存储超出允许范围的值将导致错误。
 
The type integer is the common choice, as it offers the best balance between range, storage size, and  performance. The smallint type is generally only used if disk space is at a premium. The bigint  type is designed to be used when the range of the integer type is insufficient.
最常用的是integer类型,因为它均衡了范围、存储大小及性能。 通常仅在磁盘空间有限的情况下使用smallint类型。bigint类型在integer类型的范围不足时使用。
 
SQL only specifies the integer types  (or int ), smallint , and bigint . The type names  int2 , int4 , and int8 are extensions, which are also used by some other SQL database systems.
SQL标准中仅指定integer类型(或int),smallint和bigint。类型名称int2,int4和int8是扩展名,其他一些SQL数据库系统也使用这些扩展名。
发布了341 篇原创文章 · 获赞 54 · 访问量 88万+

猜你喜欢

转载自blog.csdn.net/ghostliming/article/details/104605073