Search code examples
mysqldatabasealter-table

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


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.


Solution

  • Have you tried this?

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

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