- 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
Redis - Keys Del Command
Redis DEL command is used to delete the existing key in Redis.
Return Value
Number of keys that were removed.
Syntax
Following is the basic syntax of Redis DEL command.
redis 127.0.0.1:6379> DEL KEY_NAME
Example
First, create a key in Redis and set some value in it.
redis 127.0.0.1:6379> SET tutorialspoint redis OK
Now, delete the previously created key.
redis 127.0.0.1:6379> DEL tutorialspoint (integer) 1
redis_keys.htm
Advertisements