1. Computing & Technology

Discuss in my forum

How to change the size of a MySQL column.

By , About.com Guide

See More About:
After you make a MySQL database you can alter the contents at any time. This includes changing the size of a column after it's created. If you realize after the fact that one of your columns wasn't big enough, you can use this command to change it's size:

alter table tablename modify columnname VARCHAR(50) ;

You will need to replace the highlighted portions of the code with the relevant information for your database. You can use this to increase or decrease the size of the column.

©2012 About.com. All rights reserved.

A part of The New York Times Company.