Equivalent ANSI SQL Data Types
The following table lists ANSI SQL data types, their equivalent Microsoft Access database engine SQL data types, and their valid synonyms. It also lists the equivalent Microsoft SQL Server data types.
ANSI SQL | Microsoft Access | | Microsoft SQL |
BIT, BIT VARYING | BINARY (See Notes) | VARBINARY, | BINARY, VARBINARY |
Not supported | BIT (See Notes) | BOOLEAN, LOGICAL, LOGICAL1, YESNO | BIT |
Not supported | TINYINT | INTEGER1, BYTE | TINYINT |
Not supported | COUNTER (See Notes) | AUTOINCREMENT | (See Notes) |
Not supported | MONEY | CURRENCY | MONEY |
DATE, TIME, TIMESTAMP | DATETIME | DATE, TIME (See Notes) | DATETIME |
Not supported | UNIQUEIDENTIFIER | GUID | UNIQUEIDENTIFIER |
DECIMAL | DECIMAL | NUMERIC, DEC | DECIMAL |
REAL | REAL | SINGLE, FLOAT4, IEEESINGLE | REAL |
DOUBLE PRECISION, FLOAT | FLOAT | DOUBLE, FLOAT8, IEEEDOUBLE, NUMBER (See Notes) | FLOAT |
SMALLINT | SMALLINT | SHORT, INTEGER2 | SMALLINT |
INTEGER | INTEGER | LONG, INT, INTEGER4 | INTEGER |
INTERVAL | Not supported | Not supported | |
Not supported | IMAGE | LONGBINARY, GENERAL, OLEOBJECT | IMAGE |
Not supported | TEXT (See Notes) | LONGTEXT, LONGCHAR, MEMO, NOTE, NTEXT (See Notes) | TEXT |
CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER, NATIONAL CHARACTER VARYING | CHAR (See Notes) | TEXT(n), ALPHANUMERIC, CHARACTER, STRING, VARCHAR, CHARACTER VARYING, NCHAR, NATIONAL CHARACTER, NATIONAL CHAR, NATIONAL CHARACTER VARYING, NATIONAL CHAR VARYING (See Notes) | CHAR, VARCHAR, NCHAR, NVARCHAR |
Note:
-
The ANSI SQL BIT data type does not correspond to the Microsoft Access SQL BIT data type. It corresponds to the BINARY data type instead. There is no ANSI SQL equivalent for the Microsoft Access SQL BIT data type.
-
TIMESTAMP is no longer supported as a synonym for DATETIME.
-
NUMERIC is no longer supported as a synonym for FLOAT or DOUBLE. NUMERIC is now used as a synonym for DECIMAL.
-
A LONGTEXT field is always stored in the Unicode representation format.
-
If the data type name TEXT is used without specifying the optional length, a LONGTEXT field is created. This enables CREATE TABLE statements to be written that will yield data types consistent with Microsoft SQL Server.
-
A CHAR field is always stored in the Unicode representation format, which is the equivalent of the ANSI SQL NATIONAL CHAR data type.
-
If the data type name TEXT is used and the optional length is specified, for example TEXT(25), the data type of the field is equivalent to the CHAR data type. This preserves backwards compatibility for most Microsoft Access applications, while enabling the TEXT data type (without a length specification) to be aligned with Microsoft SQL Server.
Equivalent ANSI SQL Data Types
ReplyDeleteVery informative post...!
Top 10 Mobile App Development Companies in New York, USA | Hire Mobile App Developers New York 2022
Waiting for your future posts...
This comment has been removed by the author.
ReplyDeleteAt Attract Group's online marketing services, the focus is on helping businesses increase their online presence and attract more customers. With a team of experts who specialize in SEO, PPC, social media marketing, and more, they offer comprehensive strategies tailored to each client's unique needs. By utilizing the latest marketing techniques and technologies, they help businesses stay ahead of the competition and achieve their goals. Trust Attract Group to take your online marketing efforts to the next level.
ReplyDelete