PostgreSQL 數據類型


數值類型

數值類型由兩個字節,4字節和8字節的整數,4字節和8字節的浮點數和可選精度的小數。下表列出了可用的類型。 www.yiibai.com

Name Storage Size Description Range
int2 2 bytes small-range integer -32768 to +32767
int4 4 bytes typical choice for integer -2147483648 to +2147483647
int8 8 bytes large-range integer -9223372036854775808 to 9223372036854775807
decimal variable user-specified precision,exact up to 131072 digits before the decimal point; up to 16383 digits after the decimal point
float4 4 bytes variable-precision,inexact 6 decimal digits precision
float8 8 bytes variable-precision,inexact 15 decimal digits precision
serial2 2 bytes small autoincrementing integer 1 to 32767
serial4 4 bytes autoincrementing integer 1 to 2147483647
serial8 8 bytes large autoincrementing integer 1 to 9223372036854775807


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM