Redis String: INCRBY
INCRBY key increment
Redis INCRBY command is used to increment the number stored at key by specified value. If the key does not exist, it is set to 0 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 an integer.
Syntax:
INCRBY key increment
Available since
1.0.0.
Return Value
Integer reply, the value of key after the increment
Return Value Type
Integer
Example: Redis INCRBY
127.0.0.1:6379> SET visitors 1000 OK 127.0.0.1:6379> INCRBY visitors 10 (integer) 1010 127.0.0.1:6379> GET visitors "1010" 127.0.0.1:6379>
Previous:
INCR
Next:
INCRBYFLOAT
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework