修改本页
Redis

HMSET key field value [field value ...]

Sets the specified fields to their respective values in the hash stored at key. This command overwrites any existing fields in the hash. If key does not exist, a new key holding a hash is created.

返回值

Simple string reply

例子

redis>  HMSET myhash field1 "Hello" field2 "World"
OK
redis>  HGET myhash field1
"Hello"
redis>  HGET myhash field2
"World"
redis> 
Comments powered by Disqus