English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis HGETALL command is used to return all fields and values in the hash table.
In the return value, immediately after each field name (field name), is the value of the field, so the length of the return value is twice the size of the hash table.
Basic Syntax of Redis HGETALL Command:
redis 127.0.0.1:6379> HGETALL KEY_NAME
>= 2.0.0
Returns the fields and field values of the hash table in list form. If the key does not exist, an empty list is returned.
redis> HSET myhash field1 "Hello" (integer) 1 redis> HSET myhash field2 "World" (integer) 1 redis> HGETALL myhash 1) "field1" 2) "Hello" 3) "field2" 4) "World" redis>