HMSET
Deprecated
As of Redis version 4.0.0, this command is regarded as deprecated.
It can be replaced by HSET with multiple field-value pairs when migrating or writing new code.
Syntax
HMSET key field value [field value ...]
- Available since:
- Redis Open Source 2.0.0
- Time complexity:
- O(N) where N is the number of fields being set.
- ACL categories:
-
@write,@hash,@fast, - Compatibility:
- Redis Enterprise and Redis Cloud compatibility
Sets the specified fields to their respective values in the hash stored at
key.
This command overwrites any specified fields already existing in the hash.
If key does not exist, a new key holding a hash is created.
Examples
Redis Enterprise and Redis Cloud compatibility
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Deprecated as of Redis v4.0.0. |
Return information
Simple string reply:
OK.