Skip to content

INCRBY

INCRBY key delta

INCRBY command increments the integer at ‘key’ by the delta specified. Creates ‘key’ with value (delta) if absent. The command raises an error if the value is a non-integer.

Returns the new value of ‘key’ on success.

localhost:7379> SET k 43
OK
localhost:7379> INCRBY k 10
OK 53
localhost:7379> INCRBY k2 50
OK 50
localhost:7379> GET k2
OK "50"