Sunday, October 10, 2021

Comparing access and sql server data types

Access data types are differently named from SQL Server data types. For example, a SQL Server column of the bit data type is imported or linked into Access with the Yes/No data type. The following table compares SQL Server and Access data types.

SQL Server data type

Access data type

Access field size

bigint

Large Number

For more information, see Using the Large Number data type.

binary (field size)

Binary

Same as SQL Server field size

bit

Yes/No

char (field size), where field size is less than or equal to 255

Text

Same as SQL Server field size

char (field size), where field size is greater than 255

Memo

datetime

Date/Time

Double-precision floating point

datetime2

Date/Time Extended

Encoded string of 42 bytes. For more information, see Using the Date/Time Extended data type.

decimal (precision, scale)

Number

Decimal (Access Precision and Scale properties match SQL Server precision and scale.)

float

Number

Double

image

OLE Object

int

Number

Long Integer

money

Currency

nchar (field size), where field size is less than or equal to 255

Text

Same as SQL Server field size

nchar (field size), where field size is greater than 255

Memo

ntext

Memo

numeric (precision, scale)

Number

Decimal (Access Precision and Scale properties match SQL Server precision and scale.)

nvarchar (field size), where field size is less than or equal to 255

Text

Same as SQL Server field size

nvarchar (field size), where field size is greater than 255

Memo

nvarchar(MAX)

Memo

real

Number

Single

smalldatetime

Date/Time

smallint

Number

Integer

smallmoney

Currency

sql_variant

Text

255

text

Memo

timestamp

Binary

8

tinyint

Number

Byte

uniqueidentifier

Number

Replication ID

varbinary

Binary

Same as SQL Server field size

varbinary (MAX)

OLE Object

varchar (field size), where field size is less than or equal to 255

Text

Same as SQL Server field size

varchar (field size), where field size is greater than 255

Memo

varchar(MAX)

Memo

xml

Memo

No comments:

Post a Comment