doc-exports/docs/dli/sqlreference/dli_08_0090.html
Su, Xiaomeng 04d4597cf3 dli_sqlreference_0511_version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2023-11-02 14:34:08 +00:00

5.9 KiB

Viewing All Tables

Function

This statement is used to view all tables and views in the current database.

Syntax

1
SHOW TABLES [IN | FROM db_name] [LIKE regex_expression];

Keyword

FROM/IN: followed by the name of a database whose tables and views will be displayed.

Parameters

Table 1 Parameter description

Parameter

Description

db_name

Database name, which consists of letters, digits, and underscores (_). The value cannot contain only digits or start with a digit or underscore (_).

regex_expression

Name of a database table.

Precautions

None

Example

  1. Create a table. For details, see Creating an OBS Table or Creating a DLI Table.
  2. To show all tables and views in the current database, run the following statement:
    1
    SHOW TABLES;
    
  3. To show all tables started with test in the testdb database, run the following statement:
    1
    SHOW TABLES IN testdb LIKE "test*";