Hashes Hkeys
# Redis Hkeys Command
[!(#) Redis Hashes](#)
The Redis HKEYS command retrieves all fields (domains) in a hash table.
### Syntax
The basic syntax of the Redis HKEYS command is as follows:
redis 127.0.0.1:6379> HKEYS key
### Available Versions
>= 2.0.0
### Return Value
A list containing all fields (domains) in the hash table. Returns an empty list when the key does not exist.
### Example
redis 127.0.0.1:6379> HSET myhash field1 "foo"(integer) 1 redis 127.0.0.1:6379> HSET myhash field2 "bar"(integer) 1 redis 127.0.0.1:6379> HKEYS myhash 1) "field1"2) "field2"
[!(#) Redis Hashes](#)
YouTip