OpenDBX/DBMS Datatypes
From Linuxnetworks
Contents
Data type support
Numeric types
The table below lists the numeric data types supported by the database implementations. Each cell contains values for language and type support, e.g. MySQL supports the BOOLEAN keyword but maps it to a 8 bit integer type whereas PostgreSQL supports both, the keyword and the type.
Database | BOOLEAN | SMALLINT | INTEGER | BIGINT | DECIMAL | REAL | FLOAT | DOUBLE PRECISION |
---|---|---|---|---|---|---|---|---|
Firebird | no / no | yes / yes | yes / yes | yes / yes | yes / yes | yes / yes | ? | yes / yes |
MySQL | yes / no | yes / yes | yes / yes | yes / yes | yes / yes | yes / yes | yes / ? | yes / yes |
Oracle | no / no | yes / yes | yes / yes | yes / yes | yes / yes | yes / yes | ? | yes / yes |
PostgreSQL | yes / yes | yes / yes | yes / yes | yes / yes | yes / yes | yes / yes | yes / ? | yes / yes |
SQL Server | no / no | yes / yes | yes / yes | yes / yes | yes / yes | yes / yes | ? | yes / yes |
SQLite | yes / no | yes / no | yes / no | yes / yes | yes / no | yes / no | ? | yes / yes |
Sybase ASE | no / no | yes / yes | yes / yes | yes / no | yes / yes | yes / yes | ? | yes / yes |
Real BOOLEANs are only supported by PostgreSQL while MySQL and SQLite convert BOOLEAN to a tinyint or integer column. For compatibility use CHAR(1) or SMALLINT instead - whatever fits better for your needs.