Easy Tutorial
❮ Sets Sscan Keys Pttl ❯

Redis Mset Command

Redis Strings

The Redis Mset command is used to set one or more key-value pairs simultaneously.

Syntax

The basic syntax for the redis Mset command is as follows:

redis 127.0.0.1:6379> MSET key1 value1 key2 value2 .. keyN valueN

Available Versions

= 1.0.1

Return Value

Always returns OK.

Example

redis 127.0.0.1:6379> MSET key1 "Hello" key2 "World"
OK
redis 127.0.0.1:6379> GET key1
"Hello"
redis 127.0.0.1:6379> GET key2
1) "World"

Redis Strings

❮ Sets Sscan Keys Pttl ❯