DECR key

    Time complexity: O(1)

    Decrements the number stored at by one. If the key does not exist, it is set to 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.

    : the value of after the decrement

    *Examples

    redis> SET mykey "10"

    redis> SET mykey "234293482390480948029348230948"

    redis> DECR mykey

    redis>