Redis Hash: HKEYS
HKEYS key
Redis HKEYS command is used to get all field names in the hash stored at key.
Syntax:
HKEYS KEY_NAME FIELD_NAME INCR_BY_NUMBER
Available since
2.0.0.
Return Value
Array reply, a list of fields in the hash, or an empty list when a key does not exist.
Return Value Type
Integer
Example: Redis HKEYS
127.0.0.1:6379> HSET langhash lang1 "PHP" (integer) 1 127.0.0.1:6379> HSET langhash lang2 "Javascript" (integer) 1 127.0.0.1:6379> HSET langhash lang3 "Python" (integer) 1 127.0.0.1:6379> HSET langhash lang4 "Golanguage" (integer) 1 127.0.0.1:6379> HKEYS langhash 1) "lang1" 2) "lang2" 3) "lang3" 4) "lang4"
Example: Redis HKEYS another example
127.0.0.1:6379> HKEYS user 1) "email" 2) "lang" 3) "gender" 4) "visits" 5) "height" 127.0.0.1:6379> HMSET user-x name Sweaty gender Female lang English OK 127.0.0.1:6379> HKEYS user-x 1) "name" 2) "gender" 3) "lang"
Previous:
HINCRBYFLOAT
Next:
HLEN
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework