Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: Unsupported modify column: can’t change decimal column precision
[TiDB Usage Environment] Online
[TiDB Version] 5.7.25-TiDB-v4.0.16
[Encountered Problem] Error when modifying column type
[Reproduction Path]
USE test;
CREATE TABLE tmp_202208020930( c_money decimal(18, 0) NULL );
ALTER TABLE tmp_202208020930 MODIFY COLUMN c_money decimal(18, 4) NULL;
[Problem Phenomenon and Impact]
SQL Error [8200] [HY000]: Unsupported modify column: can’t change decimal column precision
PS: Executing select @@tidb_enable_change_column_type; prompts that the variable cannot be found. It should have nothing to do with lossless or lossy changes, as changing the precision to (22,4) also results in an error.