Skip to content

Commit 98989b5

Browse files
authored
fix ctc doc (#5914) (#5953)
1 parent 48fc0a2 commit 98989b5

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

sql-statements/sql-statement-alter-table.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,15 @@ Query OK, 0 rows affected, 1 warning (0.25 sec)
149149

150150
The following major restrictions apply to `ALTER TABLE` in TiDB:
151151

152-
* Multiple operations cannot be completed in a single `ALTER TABLE` statement.
152+
* Making multiple changes in a single `ALTER TABLE` statement is currently not supported.
153153

154-
* Lossy changes such as changing from `BIGINT` to `INT` are currently not supported.
154+
* Changes of the [Reorg-Data](/sql-statements/sql-statement-modify-column.md#reorg-data-change) types on primary key columns are not supported.
155+
156+
* Changes of column types on partitioned tables are not supported.
157+
158+
* Changes of column types on generated columns are not supported.
159+
160+
* Changes of some data types (for example, some TIME, Bit, Set, Enum, and JSON types) are not supported due to the compatibility issues of the `CAST` function's behavior between TiDB and MySQL.
155161

156162
* Spatial data types are not supported.
157163

sql-statements/sql-statement-change-column.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ ERROR 8200 (HY000): Unsupported modify column: change from original type decimal
151151

152152
## MySQL compatibility
153153

154-
* Making multiple changes in a single `ALTER TABLE` statement is not currently supported.
155-
* Changes of data types on primary key columns are not supported.
154+
* Making multiple changes in a single `ALTER TABLE` statement is currently not supported.
155+
* Changes of [Reorg-Data](/sql-statements/sql-statement-modify-column.md#reorg-data-change) types on primary key columns are not supported.
156156
* Changes of column types on partitioned tables are not supported.
157-
* Changes of column types on the generated columns are not supported.
158-
* Changes of some data types (for example, some TIME types, Bit, Set, Enum, JSON) are not supported due to some compatibility issues of the `cast` function's behavior between TiDB and MySQL.
157+
* Changes of column types on generated columns are not supported.
158+
* Changes of some data types (for example, some TIME, Bit, Set, Enum, and JSON types) are not supported due to the compatibility issues of the `CAST` function's behavior between TiDB and MySQL.
159159

160160
## See also
161161

sql-statements/sql-statement-modify-column.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,21 @@ CREATE TABLE `t1` (
177177
ERROR 1105 (HY000): Unsupported multi schema change
178178
```
179179
180-
* Does not support modifying the data types on the primary key columns. For example:
180+
* Does not support modifying the Reorg-Data types on the primary key columns but supports modifying the Meta-Only types. For example:
181181
182182
```sql
183183
CREATE TABLE t (a int primary key);
184184
ALTER TABLE t MODIFY COLUMN a VARCHAR(10);
185185
ERROR 8200 (HY000): Unsupported modify column: column has primary key flag
186186
```
187187
188-
* Does not support modifying the types of generate columns. For example:
188+
```sql
189+
CREATE TABLE t (a int primary key);
190+
ALTER TABLE t MODIFY COLUMN a bigint;
191+
Query OK, 0 rows affected (0.01 sec)
192+
```
193+
194+
* Does not support modifying the column types on generated columns. For example:
189195
190196
```sql
191197
CREATE TABLE t (a INT, b INT as (a+1));

0 commit comments

Comments
 (0)