mysql> alter table employee drop phoneno; Query OK, 0 rows affected (0.09 sec) Records: 0 Duplicates: 0 Warnings: 0 20. Alter table – modify column To modify existing columns in a table. To change data type of any column or to modify its size. mysql> alter table employee modify LastName varchar(20); Query OK, 0 rows affected (0.25 sec) Records: 0 Duplicates: 0 Warnings: 0 21. Rename column To rename an existing column in a table.
1. Example 1: Rename Column Using ALTER TABLE Statement with Rename Clause