How to Change Column Size in Table

Here is how to increase field length in database. Let us say you have a VARCHAR column with length 20, and want to increase its length to 255.
You need to change columnt type in database to increase coolumn size.

Here is how to do it:

ALTER TABLE table_name
MODIFY column_name
In the above command, you need to specify table_name whose column you want to modify, column_name of column whose length you want to change, and new_length, new size number.

Leave a Reply