You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MySQL ALTER command is very useful when you want to change a name of your table, any table field or if you want to add or delete an existing column in a table.
if you want to drop an existing column (field) from the MySQL table, then you will use the DROP clause along with the ALTER command as shown below −
ALTER TABLE name_of_table DROP field_name;
ALTER TABLE name_of_table ADD field_name data_type;
ALTER TABLE name_of_table ALTER i SET DEFAULT value;