Skip to content

MEDIUMINT

CREATE TABLE Employee(
emp_id MEDIUMINT,
);
Query OK, 0 rows affected (0.01 sec)

In the example provided, a table called ‘Employee’ is being created with one column ‘emp_id’. The data type assigned to ‘emp_id’ is MEDIUMINT. MEDIUMINT is a type of integer that can store values from -8388608 to 8388607, or 0 to 16777215 if unsigned.