Web Masters Site All For Web Masters

13Mar/100

MySQL: How to add column to existing table

Definition: Add column is used to add an additional column to any given table. You must specify the column name, and type. It is written as alter table add column [new column name]
Examples:

ALTER TABLE `tablename_here` ADD `new_column_name` VARCHAR( 255 ) NOT NULL ;

or

ALTER TABLE `tablename_here` ADD `new_column_name` INT NOT NULL AFTER `existing_column`;

Filed under: MySQL Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

 

No trackbacks yet.