Updated on 2023-11-03 GMT+08:00

Viewing a Specified Database

Function

This syntax is used to view the information about a specified database, including the database name and database description.

Syntax

1
DESCRIBE DATABASE [EXTENDED] db_name;

Keyword

EXTENDED: Displays the database properties.

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 (_).

Precautions

If the database to be viewed does not exist, the system reports an error.

Example

  1. Create a database, for example, testdb, by referring to Example.
  2. Run the following statement to query information about the testdb database:
    1
    DESCRIBE DATABASE testdb;