How to add new column to tables in mysql with example

if you want insert extra column to tables in mysql than use this syntax


ALTER TABLE table_name ADD col_name datatype(size);


homeno homename state country
206 chiguru karnataka india
20 krish kerala india

We adding new column address to homedetails table

ALTER TABLE homedetails ADD address varchar(30);

homeno homename state country address
206 chiguru karnataka india NULL
20 krish kerala india NULL

Previous Code:-
Auto increment column

List Code:-
Mysql Codes

Next Code:-
Delete column from tables

Leave reply

Add your comments here

Back to Top