Why is there no column rename command in mysql?

We need to rename the column in mysql with long,

alter table table_name change old_name new_name column_def.

Why not follow the syntax

alter table table_name rename old_name new-name?

+3
source share
1 answer

I would say that the reason is that when renaming you also effectively change the type of attribute. Therefore, the change is more accurate :)

+1
source

Source: https://habr.com/ru/post/1787866/


All Articles