Complete the code to set a field 'name' with value 'Alice' in a Redis hash called 'user:1'.
HSET user:1 [1] Alice
The HSET command sets a field in a hash. Here, the field is 'name'.
Complete the code to get the value of the 'email' field from the Redis hash 'user:2'.
HGET user:2 [1]
The HGET command retrieves the value of a specific field in a hash. Here, we want the 'email' field.
Fix the error in the code to delete the 'age' field from the Redis hash 'user:3'.
HDEL user:3 [1]
The HDEL command deletes one or more fields from a hash. The field to delete here is 'age'.
Fill both blanks to set the 'city' field to 'Paris' in the hash 'user:4' and then retrieve it.
HSET user:4 [1] Paris HGET user:4 [2]
Both commands use the field 'city' to set and get the value in the hash.
Fill all three blanks to create a hash 'user:5' with fields 'name' and 'age', then retrieve the 'age' field.
HSET user:5 [1] John [2] 30 HGET user:5 [3]
The HSET command sets multiple fields: 'name' with 'John' and 'age' with '30'. Then HGET retrieves the 'age' field.