INCR

Increments an integer string value by one.

Strings · Example verified

Syntax covered here

INCR key

A subsequent GET confirms that the updated number is stored as the key's string value.

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
> INCR counter
11
# connection: default
> GET counter
"11"