counter with value 10, what will be the value of counter after running INCRBY counter 5?SET counter 10 INCRBY counter 5 GET counter
The INCRBY command increases the integer value stored at the key by the specified amount. Since the initial value is 10, adding 5 results in 15.
score after running DECRBY score 3 if score does not exist before?DEL score
DECRBY score 3
GET scoreIf the key does not exist, Redis treats its value as 0. Then DECRBY score 3 subtracts 3, resulting in -3.
visits by 10.INCRBY key increment.The correct syntax for incrementing a key by a specific number is INCRBY key increment. Options B, C, and D are invalid syntax.
name holds the string value "Alice", what happens when running INCRBY name 1?SET name "Alice" INCRBY name 1
Redis throws an error if you try to increment a key holding a non-integer string value.
INCRBY counter 2 and DECRBY counter 1 concurrently on the same key counter. What guarantees does Redis provide about the final value?Redis processes commands sequentially and atomically, so concurrent INCRBY and DECRBY commands on the same key do not cause race conditions. The final value reflects all operations applied in some order.
