- Redis Basics
- Redis - Home
- Redis - Overview
- Redis - Environment
- Redis - Configuration
- Redis - Data types
- Redis Commands
- Redis - Commands
- Redis - Keys
- Redis - Strings
- Redis - Hashes
- Redis - Lists
- Redis - Sets
- Redis - Sorted Sets
- Redis - HyperLogLog
- Redis - Publish Subscribe
- Redis - Transactions
- Redis - Scripting
- Redis - Connections
- Redis - Server
- Redis Advanced
- Redis - Backup
- Redis - Security
- Redis - Benchmarks
- Redis - Client Connection
- Redis - Pipelining
- Redis - Partitioning
- Redis - Java
- Redis - Php
- Redis Useful Resources
- Redis - Quick Guide
- Redis - Useful Resources
- Redis - Discussion
Redis - String Decrby Command
Redis DECRBY command is used to decrement the number stored at the key by the 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 cannot be represented as an integer.
Return Value
Integer reply, the value of the key after the increment.
Syntax
Following is the basic syntax of Redis DECRBY command.
redis 127.0.0.1:6379> DECRBY KEY_NAME DECREMENT_AMOUNT
Example
redis 127.0.0.1:6379> SET visitors 1000 OK redis 127.0.0.1:6379> DECRBY visitors 5 (integer) 995
redis_strings.htm
Advertisements
To Continue Learning Please Login
Login with Google