SHOW DATABASES lists all databases in the CockroachDB cluster.
Synopsis
Required privileges
The user must be granted theCONNECT to specific databases in order to list those databases in the CockroachDB cluster.
Example
Show databases
\l to list all databases:
Show databases with comments
You can use to add comments on a database.Preloaded databases
New clusters and existing clusters to v25.1 or later will include auto-generated databases, with the following purposes:- The empty
defaultdbdatabase is used if a client does not specify a database in the . - The
movrdatabase contains data about users, vehicles, and rides for the vehicle-sharing app (only when the cluster is started using the ). - The empty
postgresdatabase is provided for compatibility with PostgreSQL client applications that require it. - The
systemdatabase contains CockroachDB metadata and is read-only.
system database can be if they are not needed.
Do not query the
system database directly. Instead, use objects within the .
