I am trying to find some way to relate column types across the the most used Databases: MySQL, PostgreSQL, and SQLite.
Here is what I have so far, but I'm afraid it's not done and I need some people with more experience to help me finish any missing types.
MySQL PostgreSQL SQLite
TINYINT SMALLINT INTEGER
SMALLINT SMALLINT
MEDIUMINT INTEGER
BIGINT BIGINT
BIT BIT INTEGER
_______________________________________________________
TINYINT UNSIGNED SMALLINT INTEGER
SMALLINT UNSIGNED INTEGER
MEDIUMINT UNSIGNED INTEGER
INT UNSIGNED BIGINT
BIGINT UNSIGNED NUMERIC(20)
_______________________________________________________
DOUBLE DOUBLE PRECISION REAL
FLOAT REAL REAL
DECIMAL DECIMAL REAL
NUMERIC NUMERIC REAL
_______________________________________________________
BOOLEAN BOOLEAN INTEGER
_______________________________________________________
DATE DATE TEXT
TIME TIME
DATETIME TIMESTAMP
_______________________________________________________
TIMESTAMP DEFAULT TIMESTAMP DEFAULT TEXT
NOW() NOW()
_______________________________________________________
LONGTEXT TEXT TEXT
MEDIUMTEXT TEXT TEXT
BLOB BYTEA BLOB
VARCHAR VARCHAR TEXT
CHAR CHAR TEXT
_______________________________________________________
columnname INT columnname SERIAL INTEGER PRIMARY
AUTO_INCREMENT KEY AUTOINCREMENT