Back to Redis

HKEYS

content/commands/hkeys.md

latest1.0 KB
Original Source

Returns all field names in the hash stored at key.

Examples

{{% redis-cli %}} HSET myhash field1 "Hello" HSET myhash field2 "World" HKEYS myhash {{% /redis-cli %}}

Redis Software and Redis Cloud compatibility

| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | |

Return information

{{< multitabs id="hkeys-return-info" tab1="RESP2" tab2="RESP3" >}}

Array reply: a list of fields in the hash, or an empty list when the key does not exist

-tab-sep-

Array reply: a list of fields in the hash, or an empty list when the key does not exist.

{{< /multitabs >}}