sql standard | sqlserver | postgresql | postgresql | description |
aliases | ||||
bigint | bigint | bigint | int8 | signed eight-byte integer:有符号8字节整数 |
bigserial | serial8 | autoincrementing eight-byte integer:自增属性的 bigint | ||
bit | binary | bit [ (n) ] | fixed-length bit string:定长位串 | |
bit varying | varbinary | bit varying [ (n) ] | varbit | variable-length bit string:变长位串 |
boolean | bit | boolean | bool | logical boolean (true/false):布尔值 |
box | rectangular box on a plane | |||
bytea | binary data ("byte array") | |||
character varying | varchar | character varying [ (n) ] | varchar [ (n) ] | variable-length character string:变长字符串(长度有限制) |
varchar | ||||
character | char | character [ (n) ] | char [ (n) ] | fixed-length character string:定长字符串 |
char | ||||
cidr | ipv4 or ipv6 network address | |||
circle | circle on a plane | |||
date | date | date | calendar date (year, month, day):日期(仅) | |
double precision | float() | double precision | float8 | double precision floating-point number (8 bytes):双精度8字节浮点数 |
inet | ipv4 or ipv6 host address | |||
integer | int | integer | int, int4 | signed four-byte integer:有符号4字节整数【一般意义上的整数】 |
inteval | interval [ fields ] [ (p) ] | time span:时间间隔值 | ||
line | infinite line on a plane | |||
lseg | line segment on a plane | |||
macaddr | mac (media access control) address | |||
money | money | currency amount | ||
numeric | numeric | numeric [ (p, s) ] | decimal [ (p, s) ] | exact numeric of selectable precision:高精度定点数 |
decimal | decimal | |||
path | geometric path on a plane | |||
point | geometric point on a plane | |||
polygon | closed geometric path on a plane | |||
real | real | real | float4 | single precision floating-point number (4 bytes):单精度4字节浮点数 |
float() | ||||
smallint | smallint | smallint | int2 | signed two-byte integer:小整数 |
smallserial | serial2 | autoincrementing two-byte integer:自增属性的smallint | ||
serial | serial4 | autoincrementing four-byte integer:自增属性的int | ||
text | text | variable-length character string:变长大字符串(长度足够大) | ||
varchar(max) | ||||
time without time zone | time | time [ (p) ] [ without time zone ] | time of day (no time zone):一天内的时间值,无时区 | |
time with time zone | time [ (p) ] with time zone | timetz | time of day, including time zone:一天内的时间值,有时区 | |
timestamp without time zone | datetime | timestamp [ (p) ] [ without time zone ] | date and time (no time zone):日期时间,无时区 | |
datetime2 | ||||
timestamp with time zone | datetimeoffset | timestamp [ (p) ] with time zone | timestamptz | date and time, including time zone:日期时间,有时区 |
tsquery | text search query | |||
tsvector | text search document | |||
txid_snapshot | user-level transaction id snapshot | |||
uniqueidentifier | uuid | universally unique identifier:唯一标识类型 | ||
xml | xml | xml | xml data:xml数据类型 | |
json | json data |
postgresql数据类型对比说明
猜你喜欢
转载自blog.csdn.net/stwuyiyu/article/details/79169781
今日推荐
周排行