Friday, February 10, 2012

Add a column in Mysql FIRST Or AFTER


MySQL tables are easy to extend with additional columns.

Add the email column to the end of the table. To insert the new column after a specific column, such as name, use this statement:
ALTER TABLE contacts ADD email VARCHAR(60) AFTER name;
If you want the new column to be first, use this statement:
ALTER TABLE contacts ADD email VARCHAR(60) FIRST;

No comments :

// Below script tag for SyntaxHighLighter