Complete the code to set a field 'name' with value 'Alice' in a Redis hash.
HSET user:1000 [1] Alice
The HSET command sets a field in a Redis hash. Here, 'name' is the field key.
Complete the code to retrieve the value of the field 'age' from the Redis hash 'user:1000'.
HGET user:1000 [1]
HGET fetches the value of a specific field in a Redis hash. Here, 'age' is the field name.
Fix the error in the code to get all fields and values from the hash 'user:1000'.
[1] user:1000
HGETALL returns all fields and values in a Redis hash. Other commands do not work for hashes.
Fill both blanks to set multiple fields 'name' and 'age' in the hash 'user:1000'.
HMSET user:1000 [1] [2]
HMSET sets multiple fields in a hash. Here, 'name Alice' and 'age 30' set two properties.
Fill all three blanks to create a hash 'user:1000' with fields 'name', 'age', and 'email'.
HMSET user:1000 [1] [2] [3]
HMSET sets multiple fields in a hash. Here, we set 'name', 'age', and 'email' fields to represent the object.