Easy Tutorial
❮ Sorted Sets Zrevrangebyscore Hyperloglog Pfcount ❯

Redis Hget Command

Redis Hashes

The Redis Hget command is used to return the value of a specified field in a hash table.

Syntax

The basic syntax of the redis Hget command is as follows:

redis 127.0.0.1:6379> HGET KEY_NAME FIELD_NAME

Available Versions

= 2.0.0

Return Value

Returns the value of the given field. If the field or key does not exist, it returns nil.

Example

> HSET site redis redis.com
1
> HGET site redis
"redis.com"
> HGET site mysql
(nil)

Redis Hashes

❮ Sorted Sets Zrevrangebyscore Hyperloglog Pfcount ❯