How can I modify the size of column in a MySQL table?

Viewed 295757

I have created a table and accidentally put varchar length as 300 instead of 65353. How can I fix that?

An example would be appreciated.

3 Answers
ALTER TABLE {table_name} MODIFY [COLUMN] {column_name} {column_type} {defaults and/or not-null};

(Including COLUMN is optional.)

Note: if your column was created with NOT NULL etc. you may need to specify those in the MODIFY statement to avoid losing them.

Related