---
title: "HVALS"
url: "https://docs.yugabyte.com/stable/yedis/api/hvals/"
---

# HVALS

## Synopsis

**`HVALS key`**

This command selects all the values in the hash that is associated with the given `key`.

- If the `key` does not exist, an empty list is returned.
- if the `key` is associated with a non-hash data, an error is raised.

## Return value

Returns list of values in the specified hash.

## Examples

```sh
$ HMSET yugahash area1 "America" area2 "Africa"
```

```
"OK"
```

```sh
$ HVALS yugahash
```

```
1) "America"
2) "Africa"
```

## See also

[`hdel`](/stable/yedis/api/hdel/ "hdel"), [`hexists`](/stable/yedis/api/hexists/ "hexists"), [`hget`](/stable/yedis/api/hget/ "hget"), [`hgetall`](/stable/yedis/api/hgetall/ "hgetall"), [`hkeys`](/stable/yedis/api/hkeys/ "hkeys"), [`hlen`](/stable/yedis/api/hlen/ "hlen"), [`hmget`](/stable/yedis/api/hmget/ "hmget"), [`hmset`](/stable/yedis/api/hmset/ "hmset"), [`hset`](/stable/yedis/api/hset/ "hset"), [`hincrby`](/stable/yedis/api/hincrby/ "hincrby"), [`hstrlen`](/stable/yedis/api/hstrlen/ "hstrlen")
