Codeigniter Menu

HTML CSS

Video

Sound

SEO


Dec 23
2010

Add Columns in mySQL

Posted by kelchuk in Untagged 

Whether you need to get through school or you need to modify a commerce application, adding columns into mySQL is something that must be done to custom tweak databases.

The following 3 commands can be used in at the mysql prompt or made with an sql query with phpmyadmin.

ALTER TABLE mytable add column newcolumn varchar (20);
ALTER TABLE mytable ADD newcolumn VARCHAR(25) AFTER secondcolumn;
ALTER TABLE mytable ADD newcolumn VARCHAR(25) FIRST;

Alternately, the column can be added with php my admin. Just add the custom field(s) and attributes and click Go.

Comments (0)add comment

Write comment

busy