Updated on 2023-09-06 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. The precision of SQL Server is 7 digits, while that of GaussDB(DWS) is 6 digits. If the REAL value of the source database has 7 digits, 1-digit precision loss will occur when the value is synchronized to the destination database.

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