Add a Field to Existing MySQL Table

Insert a field or column right after some existing field in an existing table in a MySQL database. Replace ‘feildname’ with the new field name which you want to add. Replace ‘existingfield’ with your existing field name (the new field will be inserted after this existing field).

ALTER TABLE `tablename` ADD `fieldname` VARCHAR( 2 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `existingfield` ;

See more:

Questions and Comments are Welcome

Your email address will not be published. All comments will be moderated.

Please wrap code in "code" bracket tags like this:

[code]

YOUR CODE HERE 

[/code]