Returns the value associated with field
in the hash stored at key
.
返回值
Bulk string reply: the value associated with field
, or nil
when field
is not
present in the hash or key
does not exist.
例子
redis>
HSET myhash field1 "foo"
(integer) 1redis> HGET myhash field1
"foo"redis> HGET myhash field2
(nil)