
- Redis Basics
- Redis - Home
- Redis - Overview
- Redis - Environment
- Redis - Configuration
- Redis - Data types
- Redis Commands
- Redis - Commands
- Redis - Keys
- Redis - Strings
- Redis - Hashes
- Redis - Lists
- Redis - Sets
- Redis - Sorted Sets
- Redis - HyperLogLog
- Redis - Publish Subscribe
- Redis - Transactions
- Redis - Scripting
- Redis - Connections
- Redis - Server
- Redis Advanced
- Redis - Backup
- Redis - Security
- Redis - Benchmarks
- Redis - Client Connection
- Redis - Pipelining
- Redis - Partitioning
- Redis - Java
- Redis - Php
- Redis Useful Resources
- Redis - Quick Guide
- Redis - Useful Resources
- Redis - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Redis - Hash Hdel Command
Redis HDEL command is used to remove specified fields from the hash stored at the key. Specified fields that do not exist within this hash are ignored. If the key does not exist, it is treated as an empty hash and this command returns 0.
Return Value
Integer reply, the number of fields that were removed from the hash, not including specified but non-existing fields.
Syntax
Following is the basic syntax of Redis HDEL command.
redis 127.0.0.1:6379> HDEL KEY_NAME FIELD1.. FIELDN
Example
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) 1
redis_hashes.htm
Advertisements