del
DEL
Delete keys
Usage: del key [type]
Returns the number of deleted keys.
📍 type is one of string/list/set/zset/hash/stream.
The type argument was added in ent811. Please use it.
Example
| Command> | set key1 Hello |
| Result> | OK |
| Command> | set key2 Redis |
| Result> | OK |
| Command> | set key3 Server |
| Result> | OK |
| Command> | del key1 string |
| Result> | 1 |
| Command> | del key2 key3 string |
| Result> | 2 |
View animation
Syntax
DEL key [key ...] [type]
- Available since version 1.0.0.
- Time complexity is O(N). N is the number of keys to delete.
- ent811 type added.