HMSET key field value [field value ...]

Deprecation notice: as of Redis version 4.0.0 this command is considered as deprecated. While it is unlikely that it will be completely removed, prefer using `HSET` with multiple field-value pairs in its stead.

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.

*Return value

Simple string reply


redis>  HMSET myhash field1 "Hello" field2 "World"
redis>  HGET myhash field1
redis>  HGET myhash field2