# HVALS

> Get all values of a hash.

URL: https://docs.hotkv.com/commands/hvals/

```
HVALS key
```

- Group: Hash
- Complexity: O(N) where N is the size of the hash
- HotKV Cloud: all plans
- On-Premise: no license needed

`HVALS` returns every value in the hash stored at `key`, without the field
names. The order is not defined. If you need fields and values together, use
[HGETALL](https://docs.hotkv.com/commands/hgetall/index.md).

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Hash exists | Array of bulk strings: the values | Same |
| Key does not exist | Empty array | Same |

`HVALS` replies with a `WRONGTYPE` error if `key` holds a value that is not a
hash.

## Examples

```
127.0.0.1:6379> HSET user:1 name "Ada" lang "en"
(integer) 2
127.0.0.1:6379> HVALS user:1
1) "Ada"
2) "en"
```

## Compatibility

Same as Redis 7.4 and Valkey 8.

## See also

[HKEYS](https://docs.hotkv.com/commands/hkeys/index.md), [HGETALL](https://docs.hotkv.com/commands/hgetall/index.md), [HMGET](https://docs.hotkv.com/commands/hmget/index.md),
[HSCAN](https://docs.hotkv.com/commands/hscan/index.md)