Help Center/ Database and Application Migration UGO/ User Guide/ Syntax Conversion/ Conversion Error Codes/ Error Codes Generated During Conversion from MySQL to GaussDB/ U0400008: GaussDB schema name cannot be specified when ALTER TABLE is used to rename a table
Updated on 2025-06-07 GMT+08:00

U0400008: GaussDB schema name cannot be specified when ALTER TABLE is used to rename a table

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

If the new table name contains a schema name, the schema name will be deleted during UGO conversion, and this error is reported.

When ALTER TABLE is used to rename a GaussDB database table, the schema name cannot be specified for the new table name, for example:

ALTER TABLE schema_name.table_name RENAME TO new_schema_name.new_table_name;

Suggestion

If the schema name of a table is changed in the source statement, the converted statement cannot be equivalent to the source statement. You need to manually move the renamed table to the target schema.