MySQL - alter column

I needed to convert a column from varchar(25) to varchar(64). Found this somewhere on the page: MySQL 5.1 Docs

ALTER table table_name MODIFY somecolumn varchar(64) NOT NULL

The NOT NULL part needs to match what the column definition is today or else it will default back to NULL.

Comments

Popular posts from this blog

BootstrapX clickover

Template Toolkit Debugging inside of Perl Dancer

2 ways to get SQLite to put dates into columns