数据仓库服务 GaussDB(DWS)-数据类型迁移:类型对照

时间:2025-02-12 15:05:07

类型对照

数据类型

SQL-Server类型

GaussDB (DWS) OUTPUT

时间类型

datetimeoffset [ ( n ) ]

timestamptz(n)

datetime2 [ ( n ) ]

timestamp(n)

datetime

timestamp

smalldatetime

timestamp

date

date

time [ ( n ) ]

time(n)

数字类型

float [ ( n ) ]

float(n)

real [ ( n ) ]

float(n)

decimal [ ( precision [ , scale ] ) ]

decimal

numeric [ ( precision [ , scale ] ) ]

numeric

money

money

smallmoney

money

bigint

bigint

int

int

smallint

smallint

tinyint

tinyint

bit

bit

字符类型

nvarchar [ ( n | max ) ]

varchar

nchar [ ( n ) ]

nchar(n)

varchar [ ( n | max ) ]

varchar(n)

char [ ( n ) ]

char(n)

二进制类型

varbinary [ ( n | max ) ]

BYTEA

binary [ ( n ) ]

BYTEA

其它类型

uniqueidentifier

text

support.huaweicloud.com/tg-dws/dws_07_0189.html