Description:
This is feature request.
As of 8.3.0, we have to use `MODIFY` or `CHANGE` syntax to just add / remove / modify comment like below lines,
mysql83 8> SHOW CREATE TABLE t1\G
*************************** 1. row ***************************
Table: t1
Create Table: CREATE TABLE `t1` (
`num` int NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1 row in set (0.00 sec)
mysql83 8> ALTER TABLE t1 MODIFY num int NOT NULL COMMENT 'Primary Key!';
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql83 8> SHOW CREATE TABLE t1\G
*************************** 1. row ***************************
Table: t1
Create Table: CREATE TABLE `t1` (
`num` int NOT NULL COMMENT 'Primary Key!',
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1 row in set (0.00 sec)
I request to support ALTER COLUMN syntax to add / remove / modify column COMMENT like a SET DEFAULT.
ALTER TABLE t1 ALTER COLUMN num SET COMMENT 'new comment';
https://dev.mysql.com/doc/refman/8.3/en/alter-table.html
How to repeat:
This is feature request.