HMGET
AttentionThis page documents an earlier version. Go to the latest (v2.1)version.
Synopsis
HMGET key field [field …]
This command fetches one or more values for the given fields of the hash that is associated with the given key
.
- For every given
field
, (null) is returned if eitherkey
orfield
does not exist. - If
key
is associated with a non-hash data, an error is raised.
Return Value
Returns list of string values of the fields in the same order that was requested.
Examples
You can do this as shown below.
$ HMSET yugahash area1 "Africa" area2 "America"
"OK"
$ HMGET yugahash area1 area2 area_none
1) "Africa"
2) "America"
3) (null)
See Also
hdel
, hexists
, hget
, hgetall
, hkeys
, hlen
, hmset
, hset
, hincrby
, hstrlen
, hvals
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .