Updated on 2025-06-07 GMT+08:00

U0400038: GaussDB does not support the SHOW command

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 SHOW command of MySQL is used to obtain information about databases, tables, columns, or database server status in multiple ways. GaussDB does not support the SHOW command of MySQL. You need to query the view or system function to obtain the same information.

Suggestion

Based on the function of the original SHOW command of MySQL, use the corresponding GaussDB query statement, for example:

  1. SHOW TABLES of MySQL displays all table names in the current database. In GaussDB, you can use SELECT tablename FROM pg_catalog.pg_tables; to query all table names in a database.
  2. show columns from table_name of MySQL displays all columns in the table_name table. In GaussDB, you can run the following statement to obtain all columns in the table_name table:
    SELECT column_name, data_type, character_maximum_length, is_nullable, column_default
    FROM information_schema.columns
    WHERE table_name = 'table_name';