HGET

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

Get the value by field

Usage: hget key field
Gets the value of the specified field.

Example

Command>hgetall user-1
Result> 0) email -> charlie@redisgate.com
1) language -> English
2) gender -> m
Command>hget user-1 language
Result>English
Command>hget user-1 email
Result>charlie@redisgate.com

View animation



Syntax

HGET key field

  • Available since version 2.0.0.
  • Time complexity is O(1).
SQL Select If you have Redis Enterprise 7.3.0 or later, try SELECT.
Related commands HMGET, HVALS, GET, LINDEX
Clients for Java Jedis, Lettuce, Redisson
Clients for C Hiredis

<< HRM HGET HLEN >>

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