how to rename a two-word(for example; 'manager id') column name in MySQL

Viewed 42

i tried using this code below ALTER TABLE table_name change "MANAGER ID" TO manager_id;

error message received: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"MANAGER ID" TO manager_id' at line 1 0.000 sec

2 Answers

Correct syntax is:

ALTER TABLE table_name RENAME COLUMN `MANAGER ID` TO manager_id;
Related