Data types and range of data management system MySQL database
TEXT Data Types in MySQL
CHAR data type for storing a data string of fixed length.
It may contain characters, numbers and special characters.
The fixed length defined in parenthesis, and always reserve space for this length but not in use.
For example, CHAR (50), is a fixed-length field of 50 positions.
The maximum length we can define a CHAR field is 255.
VARCHAR data type for storing a data string (characters, numbers and special characters) of variable length.
The maximum length is 255 characters.
Makes good use of disk space because it does not reserve the space defined maximum length, but it only occupies space the size of the data stored in that field.
It is the most widely used data type for small fields.
TINYTEXT data type is used for storing a data string (only characters, no numbers or special characters support) with a maximum length of 255 characters.
TEXT data type is used for storing a character string of maximum length of 65,535 characters.
The data type BLOB is used for storing BLOB data type (Binary Large Object).
Supports a maximum length of 65,535 bytes of data.
MEDIUMTEXT data type is used for storing a string with a maximum length of 16,777,215 characters.
The data type is used to store data MEDIUMBLOB BLOB with a maximum length 16,777,215 bytes.
LONGTEXT data type for storing a string of maximum length of 4,294,967,295 characters.
The data type for storing LONGBLOB a BLOB maximum length of 4,294,967,295 bytes.
ENUM data type used to enter a list of possible values.
The maximum length is 65,535 possible values.
Attempting to enter a value in this field, that is not listed, do not insert anything and will have an empty value ('').
For example if a column defined as ENUM ('one', 'two'), then in this column can only store the values 'one' or 'two'.
If we add any other value (eg 'three'), not recorded 'three' and instead be the field empty, worthless ('').
The SET datatype is similar to ENUM but the maximum length is 64 possible values, and possible values can be combined.
For example, if a column defined as SET ('one', 'two) then this column will take the following values 'one' or 'two' or 'one,two', 'two,one.'