Bug #32497 Rename column name without changing anything else
Submitted: 19 Nov 2007 16:01 Modified: 24 Aug 23:54
Reporter: Susanne Ebrecht Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Parser Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to:
Triage: Triaged: D5 (Feature request)

[19 Nov 2007 16:01] Susanne Ebrecht
Description:
It would be nice, to support a simple rename of a single column.

Something like:

ALTER TABLE tab_name RENAME [ COLUMN ] old_col_name TO new_col_name;

At the moment there is only:

ALTER TABLE tab_name CHANGE [COLUMN] old_col_name new_col_name column_definition;

But sometimes you don't want to change the definition, you just want to change the name.

How to repeat:
See above.

Suggested fix:
Add a simple rename for columns at the parser.
[3 Mar 2012 12:32] Valerii Kravchuk
This is a duplicate of Bug #26949.
[24 Aug 18:24] Abhishek Ranjan
Posted by developer:
 
Implemented via worklog WL#10761
[24 Aug 23:54] Paul Dubois
Posted by developer:
 
Fixed in 8.0.3.

ALTER TABLE now supports easier column renaming using RENAME COLUMN
old_name TO new_name syntax. RENAME COLUMN is more convenient than
CHANGE, which requires respecifying the current column definition.