Syntax
HINCRBY key field increment
Increment the value of the
field with “increment” value. If key doesn't exist, then key is
created. If the field doesn't exist the value is set to 0 before the
operation is performed.
Returns
The value at field after the
increment operation.
127.0.0.1:6379> hmset marks "Krishna" 55 "Arjun" 95 "Gopi" 87 OK 127.0.0.1:6379> hgetall marks 1) "Krishna" 2) "55" 3) "Arjun" 4) "95" 5) "Gopi" 6) "87" 127.0.0.1:6379> hincrby marks "Krishna" 45 (integer) 100 127.0.0.1:6379> hgetall marks 1) "Krishna" 2) "100" 3) "Arjun" 4) "95" 5) "Gopi" 6) "87" 127.0.0.1:6379>
No comments:
Post a Comment