---
title: "LISTDB"
url: "https://docs.yugabyte.com/stable/yedis/api/listdb/"
---

# LISTDB

## Synopsis

`LISTDB` is used to list all the yedis database(s) available for use. All databases other than the default database ("0") need to be created using the `CREATEDB` command before use.

A client can issue the `LISTDB` command through the redis-cli.

## Return value

Returns an array of string values, with the yedis database names.

## Examples

```sh
$ LISTDB
```

```
1) "0"
```

```sh
$ CREATEDB "second"
```

```
"OK"
```

```sh
$ LISTDB
```

```
1) "0"
2) "second"
```

```sh
$ CREATEDB "3.0"
```

```
"OK"
```

```sh
$ LISTDB
```

```
1) "0"
2) "3.0"
3) "second"
```

```sh
$ DELETEDB "3.0"
```

```
"OK"
```

```sh
$ LISTDB
```

```
1) "0"
2) "second"
```

## See also

[`createdb`](/stable/yedis/api/createdb/ "createdb") [`listdb`](/stable/yedis/api/listdb/ "listdb") [`deletedb`](/stable/yedis/api/deletedb/ "deletedb") [`flushdb`](/stable/yedis/api/flushdb/ "flushdb") [`flushall`](/stable/yedis/api/flushall/ "flushall") [`select`](/stable/yedis/api/select/ "select")
