Updated on 2025-02-22 GMT+08:00

SHOW TABLE

Function

This command is used to display all tables in current database or all tables in a specific database.

Syntax

SHOW TABLES [IN db_name];

Parameter Description

Table 1 Parameter descriptions

Parameter

Description

IN db_name

Name of the specific database whose tables need to be all displayed.

Caveats

IN db_Name is optional. It is required only when you need to display all tables of a specific database.

Example

SHOW TABLES IN hudidb;

Permission Requirements

Metadata service provided by DLI

  • SQL permissions:

    database

    table

    LIST_TABLES, DISPLAY_ALL_TABLES, SELECT (only one of them required)

    None

  • Fine-grained permission: dli:database:displayAllTables

Metadata services provided by LakeFormation. Refer to the LakeFormation documentation for details on permission configuration.

System Response

You can directly view the job result on the job submission page, or go to the SQL Jobs page, locate the job, click More in the Operation column, and select View Result.