Help Center/ Database and Application Migration UGO/ User Guide/ Syntax Conversion/ Conversion Error Codes/ Error Codes Generated During Conversion from MySQL to GaussDB/ U0400042: GaussDB (M-compatible mode) does not support ALTER TABLE CHECK CONSTRAINT ENFORCED
Updated on 2025-06-07 GMT+08:00

U0400042: GaussDB (M-compatible mode) does not support ALTER TABLE CHECK CONSTRAINT ENFORCED

Description

Database Type and Version

  • Source database type and version: MySQL 5.5, 5.6, 5.7, and 8.0
  • Target database type and version: all GaussDB versions

Syntax Example

The Alter TABLE CHECK CONSTRAINT ENFORCED statement of MySQL invalidates the created CHECK constraint. This error is reported because GaussDB (M-compatible mode) does not support this syntax, for example:

ALTER TABLE test_check ALTER CHECK c1 NOT ENFORCED;

Suggestion

No solution is available. You are advised to refactor application code.