The access and SQL server data types are different. These types are useful when you use scripts to define data.
Microsoft Access Data Type |
SQL Server Data Type |
Yes/No |
Bit |
Smallint (byte type) |
Tinyint |
Integer (long Integer) |
Int |
Real (single precision floating point type) |
Real |
Float (dual-precision floating point type) |
Float |
Currency |
Money |
Smallmoney |
Decimal/numeric |
Decimal |
Numeric |
Date/Time |
Datetime |
Smalldatetime |
AutoNumber (incremental) |
Int (with the defined Identity attribute) |
Text (n) |
Varchar (n) |
Nvarchar (n) |
Memo |
Text |
IMAGE (OLE Object) |
Image |
Replication ID (also known as GUID )) |
Uniqueidentifier (for SQL Server 7.0 only) |
Hyperlink |
Ntext (but the hyperlink is not activated) |
(No equivalent data type) |
Nchar |
(No equivalent data type) |
Varbinary |
(No equivalent data type) |
User-Defined |
(No equivalent data type) |
Smallint |
(No equivalent data type) |
Timestamp |
(No equivalent data type) |
Char |
|
Nchar |
Description of Access Data Types
Datetime: the date or time value of 8 bytes between 100 and 9999.
Uniqueidentifier: the unique identification number used for Remote Procedure Calls.
Real: Four-byte Single-precision floating point number. The negative number ranges from-3.402823e38 to-1.401298e-45, positive numbers from 1.401298e-45 to 3.402823e38, and 0.
Float: 8-byte double-precision floating point number. The range of negative numbers is from-1.79769313486232e308 to-4.94065645841247e-324. Positive numbers range from 4.94065645841247e-324 to 0.
Smallint: The number of short integers between-32,768 and 32,767 bytes.
Integer: the number of long integers in four bytes ranging from-2,147,483,648 to 2,147,483,647.
Decimal: 17 bytes contain the exact numeric data type from 1028-1 to-1028-1. You can define the precision (1-28) and the symbol (0-definition accuracy ). The default values are 18 and 0.
Text: two bytes per character (see note), ranging from 0 to a maximum of 2 to 14 gigabytes.
Image: The size ranges from 0 to GB. Used for OLE objects.
Character: the length of each character is from 0 to 255 characters.