mysql_install_redhat

Last updated on March 1st, 2022 at 09:02 am

This query will show you how to insert a new column after a specific column in mysql.

mysql
For example :- 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;

2 thoughts on “How to insert new column after a specific column in mysql”
  1. Is it possible to add multiple columns after a specific existent column using one query?
    Say you want to add the columns ’email’ and ‘telephone’ after the column ‘name’..

Leave a Reply

Your email address will not be published. Required fields are marked *