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

vehomzzz picture vehomzzz · Aug 14, 2009 · Viewed 286.2k times · Source

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.

Answer

Mike Dinescu picture Mike Dinescu · Aug 14, 2009

Have you tried this?

ALTER TABLE <table_name> MODIFY <col_name> VARCHAR(65353);

This will change the col_name's type to VARCHAR(65353)