Redis String: INCRBYFLOAT
INCRBYFLOAT key increment
Redis INCRBYFLOAT command is used to increments the string representing a floating point number stored at key by the specified increment. If the key does not exist, it is set to 0 before performing the operation. If the key contains a value of the wrong type or current key content or the specified increment are not parsable as floating point number, then an error is returned.
Syntax:
INCRBYFLOAT KEY_NAME INCR_AMOUNT
Available since
2.6.0.
Return Value
String reply, the value of key after the increment.
Return Value Type
String
Example: Redis INCRBYFLOAT
redis 127.0.0.1:6379> SET visitors 1000.20 OK redis 127.0.0.1:6379> INCRBYFLOAT visitors .50 1000.70 redis 127.0.0.1:6379> GET visitors 1000.70
- 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