HMSET
AttentionThis page documents an earlier version. Go to the latest (v2.1)version.
Synopsis
HMSET key field value [field value …]
This command sets the data for the given field
with the given value
in the hash that is specified by key
.
- If the given
field
already exists in the specified hash, this command overwrites the existing value with the givenvalue
. - If the given
key
does not exist, a new hash is created for thekey
, and the given values are inserted to the associated given fields. - If the given
key
is associated with a non-hash data, an error is raised.
Return Value
Returns status string.
Examples
$ HMSET yugahash area1 "America" area2 "Africa"
"OK"
$ HGET yugahash area1
"America"
See Also
hdel
, hexists
, hget
, hgetall
, hkeys
, hlen
, hmget
, hset
, hincrby
, hstrlen
, hvals
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .