Here is a table of the most commonly used data types in MySQL
Data Type | Description |
Char() | Fixed length string, unused spaces get padded and eat up memory: size 0-255 |
Varchar() | Variable length string, unused spaces don’t use memory: size 0 to 65535 |
MediumText() | A string up to 16,777,215 characters long |
LongText() | A string up to 4,294,967,295 characters long |
INT | integer (whole number, no decimals) |
Double(x, d) | floating point decimal number, x is size, d is number of places after the decimal |
Bool or Boolean | Binary choice, 0 = False and 1 = True |
Date | Date data type “YYYY-MM-DD” (if set to US settings) |
DATETIME | datetime data type “YYYY-MM-DD HH:MM:SS” (if set to US settings) |
TIME | Time “HH:MM:SS” |
YEAR | year in for digit representation (ex 1908,1965,2011) |