MySQL Data Types
Posted by: Kim N. Lesmer on 03.08.2009
How many characters can fit into tinytext, text, mediumtext and longtext etc.
Text Data Types
CHAR( ) fixed from 0 to 255 characters long VARCHAR( ) variable from 0 to 255 characters long TINYTEXT, TINYBLOB maximum length of 255 characters TEXT, BLOB maximum length of 65.535 characters MEDIUMTEXT, MEDIUMBLOB maximum length of 16.777.215 characters LONGTEXT, LONGBLOB maximum length of 4.294.967.295 characters
Numeric Data Types
TINYINT( ) -128 to 127 SIGNED or 0 to 255 UNSIGNED SMALLINT( ) -32.768 to 32.767 SIGNED or 0 to 65.535 UNSIGNED MEDIUMINT( ) -8.388.608 to 8.388.607 SIGNED or 0 to 16.777.215 UNSIGNED INT( ) -2.147.483.648 to 2.147.483.647 SIGNED or 0 to 4.294.967.295 UNSIGNED BIGINT( ) -9.223.372.036.854.775.808 to 9.223.372.036.854.775.807 SIGNED or 0 to 18.446.744.073.709.551.615 UNSIGNED FLOAT small number with a floating decimal point DOUBLE( , ) large number with a floating decimal point DECIMAL( , ) DOUBLE stored as a string , allowing for a fixed decimal point
Date Data Types
DATE YYYY-MM-DD DATETIME YYYY-MM-DD HH:MM:SS TIMESTAMP YYYYMMDDHHMMSS TIME HH:MM:SS