English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Mset Command

Redis Strings (string)

The Redis Mset command is used to set one or more keys at the same time-value pair.

Syntax

The basic syntax of 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 .

Online Examples

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 (string)