To rename a column, MariaDB provides this syntax:
which requires re-specification of all the attributes of the column.
Disadvantages of the above syntax :
- All the column information might not be available to the application trying to
do the rename.
- There is a risk of accidental data type change in the above syntax which might
result in data loss.
The proposed syntax, supported by MySQL 8.0, Oracle and PostgreSQL, is:
The new proposed syntax is expected to behave the same as "ALTER TABLE ...
CHANGE" command used to rename column, without changing column attributes.
The old syntax "ALTER TABLE ... CHANGE" to rename the column will continue