MySQL Data Type

Data TypeDescriptionCHAR(size)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)VARHAR(size)This data type is used to store variable length alphanumeric data. It is more flexible from of the CHAR data. VARCHAR can hold 1 to 255 characters. CHAR is much faster than VARCHAR sometimes up to 50%.INTThe INT data type used to store number. An Integer – 2147483648 to 2147483647.DECIMALA long double-precision floating point number.DOUBLEA long double-precision floating point numberDATEA Date in YYYY-MM-DD format.TIMEA time in the HH:MM:SS format.DATETIMEA Combined date and time in the format YYYY-MM-DD HH:MM:SSTIMESTAMPAutomatic date and time of last record entryTEXTA String upto 65535 characters long.BLOBA 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
 ]]>

Anuj Kumar

This is Anuj Kumar. I’m a professional web developer with 4+ year experience. I write blogs in my free time. I love to learn new technologies and share with others.
I founded PHPGurukul in September 2015. The main aim of this website to provide PHP, Jquery, MySQL, PHP Oops and other web development tutorials.
.

Recommended Tutorials for you

Add comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.