The SHOW DATABASE statement lists the default database for the current session.

Synopsis

SHOW DATABASE

Required Privileges

No privileges are required to list the default database.

Example

$ cockroach sql --database=test
# Welcome to the cockroach SQL interface.
# All statements must be terminated by a semicolon.
# To exit: CTRL + D.
> SHOW DATABASE;
+----------+
| DATABASE |
+----------+
| test     |
+----------+
(1 row)

See Also



Yes No