After searching I can't figure out what I need to do in ALTER TABLE genres
to change the col id
to genre_id
any ideas?
Asked
Active
Viewed 7,442 times
7

Johnny
- 1,963
- 4
- 21
- 24
-
rahul has the answer, for reference see http://dev.mysql.com/doc/refman/5.1/en/alter-table.html – Patrick McDonald Nov 19 '10 at 11:54
-
I looked through that but kept getting Syntax errors. – Johnny Nov 19 '10 at 11:55
-
3Does this answer your question? [Rename a column in MySQL](https://stackoverflow.com/questions/30290880/rename-a-column-in-mysql) – enharmonic Aug 07 '20 at 20:25
1 Answers
12
alter table genres change id genre_id int(10) auto_increment;
-
@Johnny ALTER TABLE record CHANGE id genre_id INT(10) AUTO_INCREMENT ; add auto_increment – XMen Nov 19 '10 at 11:57
-