Comparison of Access and SQL Server Data Types

Source: Internet
Author: User
Tags ranges
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.