English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Hvals command returns the values of all fields in the hash table.
The basic syntax of the redis Hvals command is as follows:
redis 127.0.0.1:6379> HVALS KEY_NAME FIELD VALUE
>= 2.0.0
A list containing all the field values in the hash table. Returns an empty table when the key does not exist.
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 table/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)