In Redis, the DECRBY
command decrements the value of a key by the specified amount.
If the key doesn’t exist, DECRBY
creates the key with a value of 0
and then decrements it by the specified amount.
An error occurs if the key contains a value of the wrong type or contains a string that cannot be represented as integer. DECRBY
operations are limited to 64 bit signed integers.