Comparison of data types of Access data types with Ms-sql

Source: Internet
Author: User
Tags ole access database microsoft access database

Microsoft Access Data type SQL Server Data types
Yes/No (yes/No data type: A field data type for fields that have only two possible values (if or no, True or False). Null values are not allowed. ) Boolean or YESNO Bit data type: In an Access project, a data type that stores a value of 1 or 0. Integer values other than 1 and 0 are accepted, but are always interpreted as 1. )
Number (Number data type: A field data type in a Microsoft Access database used for numeric data that will be used in mathematical operations. However, to display or calculate currency values, you should use the Currency data type. ) (bytes) byte tinyint (tinyint data type: A single-byte (8-bit) data type in an Access project that stores integers from 0 to 255. )
Number (integer) integer smallint (smallint data type: A 2-byte (16-bit) data type in an Access project that stores a number that is between -2^15 (-32,768) and 2^15-1 (32,767). )
Number (Long integer) long int data type: a 4-byte (32-bit) data type in an Access project that stores numbers between -2^31 (-2,147,483,648) and 2^31-1 (2,147,483,647). )
Digital (single-precision floating- point type) Real data type: In an Access project, an approximate numeric data type with a precision of 7 bits, a positive value range from 1.18E-38 to 3.40E + 38, a negative value range from -1.18E-38 to -3.40e + 38, or Take 0. )
(no equivalent data type) bigint (bigint data type: A 8-byte (64-bit) data type in an Access project, stored in -2^63 (-9,223,372,036,854,775,808) and 2^63-1 (9,223,372,036,854,775, 807) between the numbers. )
numeric (double-precision floating-point) float Float (float data type: In an Access project, an approximate numeric data type with a precision of 15 bits. It stores positive values ranging from 2.23E-308 to 1.79E + 308, with a negative range of approximately 2.23E-308 to -1.79e + 308 or 0. )

Currency (Currency data type: A type of data in a Microsoft Access database that is used for fixed-point calculations with currency-related calculations or whose accuracy is extremely important. )

Currency

Money data type: The data type used to store currency values in an Access project, ranging from-922,337,203,685,477.5707 to 922,337,203,685,477.5807, with an accuracy of one out of 10,000 currency units. SmallMoney (smallmoney data type: A data type that stores currency values in an Access project, with values ranging from -214,748.3648 to 214,748.3647, with an accuracy of one out of 10,000 currency units. When smallmoney values are displayed, they are rounded to two decimal digits. )
Decimals/numeric (decimal data type (Access database): An exact numeric data type used to store -10^38-1 to 10^38-1 values. You can specify a range of values (maximum total number of digits) and precision (the maximum number of digits to the right of the decimal point). ) Decimal Decimal (Decimal data type (Access project): An exact numeric data type used to store -10^38-1 to 10^38-1 values. You can specify a range of values (maximum total number of digits) and precision (the maximum number of digits to the right of the decimal point). ) numeric (numeric data type: In an Access project, an exact numeric data type that takes values from -10^38-1 to 10^38-1. You can specify a range of values (maximum total number of digits) and precision (the maximum number of digits to the right of the decimal point). )
Date/Time (date/Time data type: A data type of an Access database used to hold date and time information. ) Date/time DateTime (datetime data type: the date and time data type in an Access project, ranging from January 1, 1753 to December 31, 9999, with an accuracy of 1% seconds, or 3.33 milliseconds. smalldatetime (smalldatetime data type: A date and time data type in an Access project that is less accurate than a datetime data type.) The data range is from January 1, 1900 to June 6, 2079, with a precision of one minute. )
Auto-numbering (AutoNumber data type: A field data type in a Microsoft Access database that automatically stores a unique number for each record when a new record is added to the table. There are three types of numbers: CIS, random, and Replication IDs. ) (increment) AutoIncrement int data type: a 4-byte (32-bit) data type in an Access project that stores numbers between -2^31 (-2,147,483,648) and 2^31-1 (2,147,483,647). ) (defines the Identity property)
Text (Text data type: A field data type in a Microsoft Access database. The text data type can contain up to 255 characters, or a smaller number of characters specified by the FieldSize property. ) (n) Text (n) or char varchar (n) (varchar (n) data type: A variable-length data type in an Access project with a maximum length of 8,000 ANSI characters. ) nvarchar (n) (nvarchar (n) data type: In an Access project, a variable-length data type that can contain up to 4,000 Unicode characters. Unicode characters account for two bytes per character, and all international characters are supported. )

Note (Memo data type: A field data type in a Microsoft Access database. The Memo field can contain a maximum of 65,535 characters. )

Memo

Text data type: A variable-length data type in an Access project that can store up to 2^31-1 (2,147,483,647) characters; The default length is 16. )
OLE Object (OLE Object data type: One of the data types of a field that is used to create objects in other applications that can be linked or embedded (inserted) into an Access database. ) Long Binary Image data type: A variable-length data type in an Access project that stores up to 2^31-1 (2,147,483,647) bytes of binary data. The image data type is used to store BLOBs (binary Large objects), slices, documents, sounds, and compiled code. )
Replication ID (aka Globally unique identifier GUID: A 16-byte field that is used to establish a unique identifier for a synchronous replication in an Access database. GUIDs are used to identify replicas, replica sets, tables, records, and other objects. In an Access database, the GUID refers to the replication ID. ) (GUID)) GUID uniqueidentifier (uniqueidentifier data type: A 16-byte globally unique identifier (GUID) in an Access project. ) (SQL Server 7.0 or later only)

Hyperlink (Hyperlink data type: The data type of an Access database field that stores a hyperlink address. The address can contain up to four parts, written in the following syntax format: displaytext#address#subaddress#. )

Hyperlink

char (char data type: a fixed-length data type that can contain up to 8,000 ANSI characters in an Access project. ), nchar (nchar data type: In an Access project, a fixed-length data type that can contain up to 4,000 Unicode characters. Unicode characters account for two bytes per character, and all international characters are supported. ), varchar, nvarchar (Hyperlink property set to Yes)
(no equivalent data type) varbinary (varbinary data type: A variable-length data type in an Access project that stores up to 8,000 bytes of binary data. )
(no equivalent data type) smallint (smallint data type: A 2-byte (16-bit) data type in an Access project that stores a number that is between -2^15 (-32,768) and 2^15-1 (32,767). )
(no equivalent data type) Timestamp (timestamp data type: In an Access project, a data type that is automatically updated each line that is inserted or updated. The values in the timestamp column are not datetime data, but binary (8) or varbinary (8), indicating the order in which the data is modified. )
(no equivalent data type) Char nchar
(no equivalent data type) sql_variant (sql_variant data type: A data type in an Access project that stores values for a variety of data types except text, ntext, image, timestamp, and sql_variant types. Used in the return value of a column, parameter, variable, or user-defined function. )
(no equivalent data type) User-defined (user-defined data type: In a Microsoft SQL Server database, a type definition that allows a column to contain data that is defined by the user with an existing system data type. Rules and default values can only be bound to user-defined data types. )

Comparison of data types of Access data types with Ms-sql

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.