Learn DBMS and MySQL

Our tutorial provides basic and advance concepts of database management and MySQL commands with detailed examples

DBMS Introduction
MySQL Database
MySQL Tables
MySQL Queries
MySQL Clauses
MySQL Conditions
MySQL Keys

MySQL Alter table

MySQL ALTER statement is used when you want to change the name of your table or any table field. It is also used to add or delete an existing column in a table. The ALTER statement is always used with "ADD", "DROP" and "MODIFY" commands according to the situation.

1) ADD a column in the table

Syntax:

   ALTER TABLE table_name 
    ADD new_column_name column_definition  
    [ FIRST | AFTER column_name ];  

The MODIFY command is used to change the column definition of the table.

The drop command is used to delete a column from the table.

Let's move on to show table command in MySQL


Share this page on :