docs/content/stable/yedis/api/hdel.md
HDEL key field [field ...]
This command removes the given fields from the hash that is associated with the given key.
key does not exist, it is characterized as an empty hash, and 0 is returned for no elements are removed.key is associated with non-hash data, an error is raised.Depends on the configuration parameter emulate_redis_responses.
emulate_redis_responses is true, returns the number of existing fields in the hash that were removed by this command.emulate_redis_responses is false, returns OK.emulate_redis_responses is true.
$ HSET yugahash moon "Moon"
1
$ HDEL yugahash moon
1
$ HDEL yugahash moon
0
emulate_redis_responses is false.
$ HSET yugahash moon "Moon"
"OK"
$ HDEL yugahash moon
"OK"
$ HDEL yugahash moon
"OK"
hexists, hget, hgetall, hkeys, hlen, hmget, hmset, hset, hincrby, hstrlen, hvals