HKEYS

Apply for Redis Developer Course Redis Regular Inspection / Technical Support Redis Enterprise Server

Get all field names of a key

The usage is hkeys key.
Field names are returned in insertion order.

Example

Command>hkeys user-1
Result> 1) email
2) language
3) gender
Command>hmset user-2 gender f name sally language Korean
Result>3
Command>hkeys user-2
Result> 1) gender
2) name
3) language

View animation



Syntax

HKEYS key

  • Available since version 2.0.0.
  • Time complexity is O(N). N is the number of fields.
SQL Select If you are on Redis Enterprise 7.3.0 or later, try SELECT.
Clients for Java Jedis, Lettuce, Redisson
Clients for C Hiredis

<< HMGET HKEYS HVALS >>

Email 답글이 올라오면 이메일로 알려드리겠습니다.