Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and works. Contact: aviboots(AT)netvision.net.il
GreenGeeks Web Hosting - Faster, Scalable & Eco-Friendly

BlueHost Web Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

getflywheel wordpress hosting


Distribute your Resume to 500+ Job Boards & Recruiters


7,788 questions

10,874 answers

573 users

What are the MySQL Data Types?

1 Answer

0 votes
Text types:
-----------

CHAR(size) - Store up to 255 characters (letters, numbers, and special characters).
VARCHAR(size) - Store up to 255 characters (letters, numbers, and special characters).
TINYTEXT - Store up to 255 characters.
TEXT - Store up to 65,535 characters.
BLOB - Store up to 65,535 bytes (Binary OBjects). 
MEDIUMTEXT - Store up to 16,777,215 characters.
MEDIUMBLOB - Store up to 16,777,215 bytes (Binary OBjects). 
LONGTEXT - Store up to 4,294,967,295 characters.
LONGBLOB - Store up to 4,294,967,295 bytes (Binary OBjects). 


Number types:
-------------

TINYINT	: 1 Bytes : -128 .. +127 : 0 .. 255
SMALLINT : 2 Bytes : -32768 .. +32767 : 0 .. 65535
MEDIUMINT : 3 Bytes : -8388608 .. +8388607 : 0 .. 16777215
INT : 4 Bytes : -2147483648 .. +2147483647 : 0 .. 4294967295
BIGINT : 8 Bytes : -9223372036854775808 .. 9223372036854775807 : 0 .. 18446744073709551615
FLOAT(size,d) : Small number with a floating decimal point. 
DOUBLE(size,d) : Large number with a floating decimal point. 


Date types:
-----------

DATE() :  YYYY-MM-DD (from '1000-01-01' to '9999-12-31').
DATETIME() : YYYY-MM-DD HH:MI:SS (from '1000-01-01 00:00:00' to '9999-12-31 23:59:59').
TIMESTAMP() : YYYY-MM-DD HH:MI:SS (from '1970-01-01 00:00:01' UTC to '2038-01-09 03:14:07' UTC). 
TIME() : HH:MI:SS (from '-838:59:59' to '838:59:59').
YEAR() : 1901 to 2155




 




answered Sep 27, 2015 by avibootz
edited Sep 27, 2015 by avibootz
...