Removes one or more keys. Keys that do not exist are silently ignored and not counted.
DEL key [key ...]
| Argument | Type | Required | Description |
|---|---|---|---|
key |
string | Yes | One or more keys to delete. |
The number of keys that were actually deleted. Keys that did not exist are not counted.
wrong number of arguments— when called with no arguments.
> SET a 1
OK
> SET b 2
OK
> DEL a b nonexistent
2
> DEL nonexistent
0