MySQL – Increase Column Size

Did you create a column with a specific size and would you like increase it now? In this MySQL Tutorial, we shall learn how to modify the size of a column in MySQL Table.

To change column size use ALTER TABLE query as shown below:

ALTER TABLE table_name MODIFY column_name datatype

Example to change column size in MySQL Table

Let us consider students table with the following schema.

ADVERTISEMENT
MySQL Change Column Size

The name column is of datatype varchar and size 5.

To increase the size of the column, we shall run the following SQL Query.

ALTER TABLE students MODIFY name VARCHAR(30);
MySQL modify column size

Now, let us see the modified schema if the column size has updated.

MySQL Describe Table

The column size has been successfully updated to the new value.