Add new column in table in MYSQL by R4R Team

We Add new column in the given table using the ALTER command

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

Now display the Library table:

SHOW library;

Id Stud_name Book_Id
1 Aman 234
2 Ram 213
3 Ramesh 89
4 John 567


Now we add new column in this table called Issue_date:

ALTER TABLE library ADD Issue_date Date;


Now display the Library table:

SHOW library;

Id Stud_name Book_Id Issue_date
1 Aman 234 19-12-2019
2 Ram 213 12-12-2019
3 Ramesh 89 19-10-2019
4 John 567 18-11-2019


Leave a Comment: