While defining columns in a table, you should mention the name of the column, datatype (integer, floating point, string, and so on), and default value (if any). MySQL supports various datatypes. Refer to the MySQL documentation for more details (https://dev.mysql.com/doc/refman/8.0/en/data-types.html). Here is an overview of all datatypes. The JSON datatype is a new extension, which will be discussed in Chapter 3, Using MySQL (Advanced):
- Numeric: TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT, and BIT.
- Floating numbers: DECIMAL, FLOAT, and DOUBLE.
- Strings: CHAR, VARCHAR, BINARY, VARBINARY, BLOB, TEXT, ENUM, and SET.
- Spatial datatypes are also supported. Refer to https://dev.mysql.com/doc/refman/8.0/en/spatial-extensions.html ...