Rename INDEX Column
- by Lee
Hey All
I have a database with around 40 tables and need to rename every index column.
IE USER a table has a bunch of fields like
user_id | user_username | user_password | etc...
I want to rename the ID columns just to id ie
id | user_username | user_password | etc...
But I keep getting mysql errors on the alter table command ie.
ALTER TABLE database RENAME COLUMN user_id to id;
Plus many different variations.
Whats the best way to do this ?
Hope you can advise