DECRBY
Subtracts an integer amount from a string counter.
Strings · Example verified
Syntax covered here
DECRBY key decrementThe case uses a positive decrement and reads back the resulting numeric string.
Tested example & replies
Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.
# connection: default
> SET counter 10
"OK"
# connection: default
> DECRBY counter 3
7
# connection: default
> GET counter
"7"