Updated on 2023-07-03 GMT+08:00

Microsoft SQL Server->GaussDB(DWS)

Table 1 Data type mapping

Data Type (Microsoft SQL Server)

Data Type (GaussDB(DWS))

Whether to Support Mapping

TINYINT

SMALLINT

Yes

SMALLINT

SMALLINT

Yes

INT

INTEGER

Yes

BIGINT

BIGINT

Yes

DECIMAL

NUMERIC

Yes

NUMERIC

NUMERIC

Yes

FLOAT

DOUBLE PRECISION

Yes

REAL

REAL

Yes

SMALLMONEY

NUMERIC(10,4)

Yes

MONEY

NUMERIC(19,4)

Yes

BIT

BOOLEAN

Yes

DATE

TIMESTAMP (0) WITHOUT TIME ZONE

Yes

DATETIME

TIMESTAMP WITHOUT TIME ZONE

Yes

DATETIME2

TIMESTAMP WITHOUT TIME ZONE

Yes

DATETIMEOFFSET

TIMESTAMP WITH TIME ZONE

Yes

TIME(p)

TIME(P) WITHOUT TIME ZONE

The value can be accurate to seconds. Decimals are discarded.

TIMESTAMP

BYTEA

Yes

XML

TEXT

Yes

CHAR

CHARACTER

Yes. If a column of this type in the source database contains characters that occupy more than one byte, increase the length of the column in the destination database.

VARCHAR

CHARACTER VARYING()

Yes. If a column of this type in the source database contains characters that occupy more than one byte, increase the length of the column in the destination database.

NCHAR

CHARACTER VARYING()

Yes. If a column of this type in the source database contains characters that occupy more than one byte, increase the length of the column in the destination database.

NVARCHAR

CHARACTER VARYING()

Yes. If a column of this type in the source database contains characters that occupy more than one byte, increase the length of the column in the destination database.

BINARY

BYTEA

Yes

VARBINARY

BYTEA

Yes

IMAGE

BYTEA

Yes

HIERARCHYID

BYTEA

Yes

NTEXT

TEXT

Yes

TEXT

TEXT

Yes

UNIQUEIDENTIFIER

CHARACTER(36)

Yes