Redis Commands
- A
- B
- Client
-
Cluster
- Cluster-addslots
- Cluster-addslotsrange
- Cluster-bumpepoch
- Cluster-count-failure-reports
- Cluster-countkeysinslot
- Cluster-delslots
- Cluster-delslotsrange
- Cluster-failover
- Cluster-flushslots
- Cluster-forget
- Cluster-getkeysinslot
- Cluster-help
- Cluster-info
- Cluster-keyslot
- Cluster-links
- Cluster-meet
- Cluster-myid
- Cluster-myshardid
- Cluster-nodes
- Cluster-replicas
- Cluster-replicate
- Cluster-reset
- Cluster-saveconfig
- Cluster-set-config-epoch
- Cluster-setslot
- Cluster-shards
- Cluster-slaves
- Cluster-slots
- Cluster
- Command
- Config
- D
- E
- F
- G
- H
- I
- K
- L
- M
- O
- P
- Q
- R
- S1
- S2
- T
- U
- W
- X
- Z1
- Z2
Docs > Redis Commands > D > Decr
Decrements the number stored at key
by one.
If the key does not exist, it is set to 0
before performing the operation.
An error is returned if the key contains a value of the wrong type or contains a
string that can not be represented as integer.
This operation is limited to 64 bit signed integers.
See INCR
for extra information on increment/decrement operations.
@return
@integer-reply: the value of key
after the decrement
@examples
SET mykey "10"
DECR mykey
SET mykey "234293482390480948029348230948"
DECR mykey