Back to Yugabyte Db

HKEYS

docs/content/stable/yedis/api/hkeys.md

2026.1.0.0-b25748 B
Original Source

Synopsis

HKEYS key

This command fetches all fields of the hash that is associated with the given key.

  • If the key does not exist, an empty list is returned.
  • If the key is associated with non-hash data, an error is raised.

Return value

Returns list of fields in the specified hash.

Examples

sh
$ HSET yugahash area1 "Africa"
1
sh
$ HSET yugahash area2 "America"
1
sh
$ HKEYS yugahash
1) "area1"
2) "area2"

See also

hdel, hexists, hget, hgetall, hlen, hmget, hmset, hset, hincrby, hstrlen, hvals