Hashes Hvals
# Redis Hvals Command
[!(#) Redis Hashes](#)
The Redis Hvals command returns all values in a hash.
### Syntax
The basic syntax of the Redis Hvals command is as follows:
redis 127.0.0.1:6379> HVALS key
### Available since
>= 2.0.0
### Return value
A list containing all values in the hash. If the key does not exist, an empty list is returned.
### Example
redis 127.0.0.1:6379> HSET myhash field1 "foo"(integer) 1 redis 127.0.0.1:6379> HSET myhash field2 "bar"(integer) 1 redis 127.0.0.1:6379> HVALS myhash 1) "foo"2) "bar"# Empty hash / non-existent key redis 127.0.0.1:6379> EXISTS not_exists (integer) 0 redis 127.0.0.1:6379> HVALS not_exists (empty list or set)
[!(#) Redis Hashes](#)
YouTip