Don't Afraid of Source Code

MySQL Data Type


Data types come in several forms and sizes, allowing the programmer to create tables suited to the scope of the project.
Data Type
This type is used to store character strings values of fixed length. The size in brackets determines the number of characters the cell can hold. The maximum number of character(i.e the size) this data type can hold is 255 characters. Ex- EmployeName CHAR(100)


This data type is used to store variable length alphanumeric data. It is more flexible form of the CHAR data. VARCHAR can hold 1 to 255 characters. CHAR is much faster than VARCHAR sometimes up to 50%.


The INT data type used to store number. An Integer – 2147483648 to 2147483647.


A long double-precision floating point number.


A long double-precision floating point number


A Date in YYYY-MM-DD format.


Time in the HH:MM:SS format.


Combined date and time in the format YYYY-MM-DD HH:MM:SS


Automatic date and time of last record entry


A String up to 65535 characters long.


A binary type for variable data.

The DECIMAL data type  parameter specify the total number of permissible digits and the number of digits that may follow the decimal point  not the number of permissible digits for the decimal point’s left side and right side.
e.g : DECIMAL(5,2) permits -999.99 to 999.99

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy