Saturday 27 August 2011

MySQL Column Type Database

In this session you will learn how to support number of column in MySQL . MySQL supports the numeric type , Date and time type, and String type (char) database.

MySQL Column Type Database

In this session you will learn how to support number of column in MySQL . MySQL supports the numeric type , Date and time type, and String type (char) database.
MySQL Numeric type and String type Database :



























  TYPEBYTE MINIMUM VALUEMAXIMUM VALUE
TINYINT 1 Byte-128127
BIT(M+7)/8 Byte  --
SMALLINT2 Byte-3276832767
MEDIUMINT3 Byte-83886088388607
INT(M) (UNSIGNED) (ZEROFILL)4 Byte-21474836482147483647
INTERGER [M]4 Byte --
BIGINT [M]8 Byte-92233720368547758089223372036854775807
FLOAT [precision]4 Byte
FLOAT [(M, D)]8 Byte
DOUBLE [(M,D)]8 Byte
DOUBLE precision [(M, D)]8 Byte -1.7976931348623157E+308 to-2.2250738585072014E-308, 0,2.2250738585072014E-308 to 1.7976931348623157E+308
REAL [(M, D)]8 Byte 
DECIMAL [(M ,D)]M+2 Byte -999.99999.99
NUMERIC[(M,D)]M+2 Byte 
VARCHAR L+1 Byte 0255
CHARM Byte 0255
TINYBLOBL+1 Byte 0256
TINYTEXTL+1 Byte 0255  (2^8-1) Char 
BLOB OR TEXTL+2 Byte  0 65,535 (2^16-1)char 
MEDIUMBLOB L+3 Byte -16,777,215(2^24-1)char
MEDIUMTEXTL+3 Byte -16,777,215(2^24-1)char
LONGBLOBL+4 Byte  -4,294,967,295(2^32-1)char
LONGTEXTL+4 Byte  -4,294,967,295 or 4GB
ENUM ('value1, value2',..)1 or  2 Byte 65,535
SET ('value1,' value 2,' .....)1 to 8 Byte064
MySQL Store the Date and Time Type







  Column Type    Store Data
DATE3 Byte
DATETIME8 Byte
TIMESTAMP4 Byte
TIME3 Byte
YEAR1 Byte

No comments:

Post a Comment