Cross-Database Data Type Mapping Reference

The table below lists, for each common database type, the conventional equivalent in 15 database engines — SQL Server, SQL Azure, Oracle, MySQL, MariaDB, PostgreSQL, SQLite, IBM DB2, Firebird, Informix, MS Access, MS Excel, FoxPro/DBF, MongoDB and InterSystems Caché. It is the same mapping data the ESF Database Migration Toolkit proposes when you pick a source and a target, so you can check a conversion before you run it.

Last updated: December 5, 2026 · 13 canonical types × 15 databases · machine-readable copy: JSON, CSV

Type mapping matrix

Canonical type SQL Server SQL Azure Oracle MySQL MariaDB PostgreSQL SQLite IBM DB2 Firebird Informix MS Access MS Excel FoxPro / DBF MongoDB InterSystems Cache
Integer (32-bit)
integer
INT INT NUMBER(10) INT INT INTEGER INTEGER INTEGER INTEGER INTEGER LONG INTEGER NUMBER INTEGER (I) INT32 INTEGER
Integer (64-bit)
bigint
BIGINT BIGINT NUMBER(19) BIGINT BIGINT BIGINT INTEGER BIGINT BIGINT BIGINT — NUMBER — INT64 BIGINT
Fixed decimal
decimal
DECIMAL(18,2) DECIMAL(18,2) NUMBER(18,2) DECIMAL(18,2) DECIMAL(18,2) NUMERIC(18,2) NUMERIC DECIMAL(18,2) NUMERIC(18,2) DECIMAL(18,2) CURRENCY NUMBER NUMERIC(18,2) (N) DECIMAL128 NUMERIC(18,2)
Floating point
float
FLOAT FLOAT BINARY_DOUBLE DOUBLE DOUBLE DOUBLE PRECISION REAL DOUBLE DOUBLE PRECISION FLOAT DOUBLE NUMBER DOUBLE (B) DOUBLE DOUBLE
Boolean
boolean
BIT BIT NUMBER(1) TINYINT(1) TINYINT(1) BOOLEAN INTEGER (0/1) SMALLINT (0/1) SMALLINT (0/1) SMALLINT (0/1) YES/NO TRUE/FALSE LOGICAL (L) BOOLEAN TINYINT
Short text
string_short
NVARCHAR(255) NVARCHAR(255) NVARCHAR2(255) VARCHAR(255) VARCHAR(255) VARCHAR(255) TEXT VARCHAR(255) VARCHAR(255) VARCHAR(255) SHORT TEXT (255) TEXT CHARACTER (C) STRING VARCHAR(255)
Long text / CLOB
string_long
NVARCHAR(MAX) NVARCHAR(MAX) NCLOB LONGTEXT LONGTEXT TEXT TEXT CLOB BLOB SUB_TYPE TEXT CLOB LONG TEXT TEXT MEMO (M) STRING LONGVARCHAR
Binary / BLOB
binary
VARBINARY(MAX) VARBINARY(MAX) BLOB LONGBLOB LONGBLOB BYTEA BLOB BLOB BLOB BLOB OLE OBJECT — GENERAL (G) BINARY LONGVARBINARY
Date
date
DATE DATE DATE DATE DATE DATE TEXT DATE DATE DATE DATE/TIME DATE DATE (D) DATE DATE
Time
time
TIME TIME — TIME TIME TIME TEXT TIME TIME DATETIME HOUR TO SECOND DATE/TIME TIME — STRING TIME
Date + time
timestamp
DATETIME2 DATETIME2 TIMESTAMP DATETIME DATETIME TIMESTAMP TEXT TIMESTAMP TIMESTAMP DATETIME YEAR TO FRACTION(5) DATE/TIME DATE DATETIME (T) DATE TIMESTAMP
UUID / GUID
uuid
UNIQUEIDENTIFIER UNIQUEIDENTIFIER RAW(16) CHAR(36) CHAR(36) UUID TEXT CHAR(16) FOR BIT DATA CHAR(16) CHARACTER SET OCTETS CHAR(36) SHORT TEXT (36) TEXT CHARACTER (C, 16) STRING VARCHAR(36)
Auto-increment key
autoincrement
IDENTITY(1,1) IDENTITY(1,1) GENERATED AS IDENTITY AUTO_INCREMENT AUTO_INCREMENT GENERATED AS IDENTITY INTEGER PRIMARY KEY AUTOINCREMENT GENERATED BY DEFAULT AS IDENTITY GENERATED BY DEFAULT AS IDENTITY SERIAL AUTO NUMBER — INTEGER AUTOINC — IDENTITY

— means the engine has no dedicated type for that role; values normally arrive in the closest general type, or need a manual decision. Every mapping can be overridden in the Select Tables step.

Conversion traps worth checking

Most failed migrations fail on types, not on connections. These are the eight that cause data loss or silent truncation most often:

  1. Boolean. SQL Server has no BOOLEAN (it uses BIT), Oracle and InterSystems Caché use NUMBER(1), MySQL and MariaDB use TINYINT(1), and SQLite stores 0/1 with no declared type. Confirm that TRUE/FALSE survive as 1/0 and that downstream code does not compare against the string "true".
  2. Auto-increment keys. Mechanisms differ by engine: IDENTITY (SQL Server), AUTO_INCREMENT (MySQL, MariaDB), GENERATED AS IDENTITY or a sequence (Oracle, PostgreSQL, IBM DB2), AUTO NUMBER (MS Access), INTEGER AUTOINC (Visual FoxPro 8 and later; classic DBF has none) and nothing at all in Excel. Generated values normally restart at 1, so foreign keys stay consistent but code that depends on specific IDs will not.
  3. Date and time. Oracle DATE already carries a time component; it is not date-only, so a date column may arrive with 00:00:00 attached. MS Access stores date and time in one Date/Time value. FoxPro T (datetime) was never widely supported, so legacy DBF files usually keep date and time in separate fields.
  4. UUID / GUID. No two engines agree: UNIQUEIDENTIFIER (SQL Server), RAW(16) (Oracle), CHAR(36) (MySQL, MariaDB), native UUID (PostgreSQL). SQL Server UNIQUEIDENTIFIER has a different byte order from the same GUID stored as text; if the value must be compared across systems, keep it as text.
  5. Fixed decimals. Check precision and scale, not just the type name. SQL Server DECIMAL tops out at 38 digits, MySQL and MariaDB at 65. Moving Oracle NUMERIC(30,10) into DECIMAL(18,2) rounds silently.
  6. Short strings. Oracle VARCHAR2 defaults to byte semantics, so a 255-byte width holds fewer characters once the text is multi-byte; declare CHAR semantics where the width matters. MS Access text fields cap at 255 characters and FoxPro character fields at 254 bytes, both of which truncate longer source values.
  7. Long text. TEXT, CLOB, NVARCHAR(MAX) and MEMO behave differently: many engines cannot index them without a prefix length, and SQL Server legacy TEXT/NTEXT is deprecated in favour of NVARCHAR(MAX).
  8. Binary. BLOB, BYTEA, VARBINARY(MAX) and Access OLE Object differ in size limits, and some drivers return an empty binary value as NULL (or the other way round), which breaks a NOT NULL constraint on the target.

Download the mapping

Both files are generated on request from the same mapping data used by the migration wizard, so they cannot drift from the table above:

  • type-mapping.json — canonical types, per-engine type names, and the caveat list as structured data.
  • type-mapping.csv — the same matrix as a spreadsheet (one row per engine, one column per canonical type).

How to read — and reuse — this table

These are the conventional equivalents each engine uses for a given role. They are a starting point, not a specification: column widths, precision, collation and empty-value handling still have to be decided per table, and the migration tool lets you change any single mapping before the transfer runs. Always confirm the result against your own schema before a production run.

You are welcome to quote this table or the JSON/CSV copy in articles, documentation or answers, with a link back to https://www.dbsofts.com/reference/type-mapping/.

Migration guides for specific pairs