HSET key field value [field value ...]
- Available since:
- Time complexity:
- O(1) for each field/value pair added, so O(N) to add N field/value pairs when the command is called with multiple field/value pairs.
- ACL categories:
Sets the specified fields to their respective values in the hash stored at
This command overwrites the values of specified fields that exist in the hash.
key doesn't exist, a new key holding a hash is created.
Integer reply: The number of fields that were added.
- Starting with Redis version 4.0.0: Accepts multiple