Mysql Query

How to rename existing column name from table using mysql query

Hi @Arun_Pondhe

Try this

ALTER TABLE table_name RENAME COLUMN old_name TO new_name;

Thanks
Ashwin S

In my case RENAME keyword is not working …Error getting

ALTER TABLE Student_Record RENAME COLUMN StudentID TO EmployeeID;

Hi @Arun_Pondhe
Do One thing drop the column as student id
ALTER TABLE Student_Record
DROP COLUMN StudentID

and
ALTER TABLE Student_Record
Add COLUMN Employee iD

Thanks
Ashwin S

ALTER TABLE Student_Record
Add COLUMN Employee iD

not working ADD keyword :smile::smile: amazing

Hi @Arun_Pondhe

Try this

ALTER TABLE Student_Record

ADD COLUMN Employee ID int AFTER Student ID

Thanks
Ashwin S