Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ SHOW DATABASE movies YIELD *

=== Show the number of databases

The number of databases can be seen using a `count()` aggregation with `YIELD` and `RETURN`.
The number of distinct databases can be seen using `YIELD` and a `count()` function in the `RETURN` clause.

.Query
[source, cypher]
----
SHOW DATABASES YIELD *
RETURN count(*) AS count
SHOW DATABASES YIELD name
RETURN count(DISTINCT name) AS count
----

.Result
Expand All @@ -319,6 +319,9 @@ RETURN count(*) AS count
+-------+
----

By specifying the `name` column and sorting the results by distinct name, only the number of distinct databases are counted, **not** the number of allocations of databases in a clustered environment.


=== Show the default database

The default database can be seen using the command `SHOW DEFAULT DATABASE`.
Expand Down