English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Hdel command is used to delete one or more specified fields from a hash table key, and fields that do not exist will be ignored.
The basic syntax of the redis Hdel command is as follows:
redis 127.0.0.1:6379> HDEL KEY_NAME FIELD1.. FIELDN
>= 2.0.0
The number of fields successfully deleted, excluding ignored fields.
redis 127.0.0.1:6379> HSET myhash field1 "foo" (integer) 1 redis 127.0.0.1:6379> HDEL myhash field1 (integer) 1 redis 127.0.0.1:6379> HDEL myhash field2 (integer) 0