DataType Mapping (Cross-DB)
DataType Mapping (Cross-DB) is a SQL data type in the Data Types category. Data type equivalents across major databases — useful when migrating between database systems. The syntax is -- MySQL: TINYINT = SQL Server: BIT = Oracle: NUMBER(1). It returns cross-DB mapping. A typical example: -- BOOLEAN equivalents: -- MySQL: TINYINT(1)/BOOLEAN -- PostgreSQL: BOOLEAN -- SQL Server: BIT -- Oracle: NUMBER(1) CHECK (col IN (0,1)) -- SQLite: INTEGER (0/1) -- AUTO_INCREMENT equivalents: -- MySQL: INT AUTO_INCREMENT -- PostgreSQL: SERIAL / GENERATED AS IDENTITY -- SQL Server: IDENTITY(1,1) -- Oracle: SEQUENCE + TRIGGER or IDENTITY (12c+) -- SQLite: INTEGER PRIMARY KEY AUTOINCREMENT A close relative is INT, which standard integer type. Range: -2147483648 to 2147483647 (signed). Use BIGINT for larger values. A close relative is VARCHAR(n), which variable-length string with a maximum length. Most common string type. Efficient for varying-length data. A close relative is TEXT, which for large text content (up to 65535 bytes in MySQL). Variants: TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT.