HDEL

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

Delete field and value

Usage: hdel key field [field ...]
Deletes the specified field and value. You can specify multiple fields.

Example

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

View animation



Syntax

HDEL key field [field ...]

  • Available since version 2.0.0.
  • Time complexity is O(N). N is the number of fields to delete.
Related commands DEL, LREM, SREM, ZREM
Clients for Java Jedis, Lettuce, Redisson
Clients for C Hiredis

<< HSETS HDEL HRM >>

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