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

Redis SUNION コマンド

Redis 集合(Set)

Redis SUNION コマンドは、指定された集合のユニオンを返します。存在しないキーは空集合として扱われます。

语法

redis SUNION コマンドの基本的な语法は以下の通りです:

redis 127.0.0.1:6379> SUNION KEY KEY1..KEYN

利用可能バージョン

>= 1.0.0

返り値

ユニオンメンバーのリスト。

オンラインサンプル

redis> SADD key1 "a"
(integer) 1
redis> SADD key1 "b"
(integer) 1
redis> SADD key1 "c"
(integer) 1
redis> SADD key2 "c"
(integer) 1
redis> SADD key2 "d"
(integer) 1
redis> SADD key2 "e"
(integer) 1
redis> SUNION key1 key2
1) "a"
2) "c"
3) "b"
4) "e"
5) "d"
redis> 

Redis 集合(Set)