MSET command in redis

MSET key1 value1 key2 value2 ... keyN valueN

Set the respective keys to the respective values. MSET will replace old values with new values.

Note: This command will never fail.

TIME COMPLEXITY: O(1) to set every key

RETURN VALUE: Status code reply Basically +OK as MSET can't fail

Syntax:

MSET key1 value1 key2 value2 ... keyN valueN

Example

redis:6379> MSET  redisKey1 value1 redisKey2 value2
"OK"

Output

OK

No comments:

Post a Comment