Redis Sunion 命令

更新时间: 2019-07-07 15:54

Redis Sunion 命令返回给定集合的并集。不存在的集合 key 被视为空集。

语法

redis 127.0.0.1:6379> SUNION KEY KEY1..KEYN

返回值

并集成员的列表。

实例

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)命令

Web Development Recipes

Web Development Recipes

Brian P. Hogan、Chris Warren、Mike Weber、Chris Johnson、Aaron Godin / Pragmatic Bookshelf / 2012-1-22 / USD 35.00

You'll see a full spectrum of cutting-edge web development techniques, from UI and eye candy recipes to solutions for data analysis, testing, and web hosting. Make buttons and content stand out with s......一起来看看 《Web Development Recipes》 这本书的介绍吧!

JS 压缩/解压工具

JS 压缩/解压工具

在线压缩/解压 JS 代码

在线进制转换器

在线进制转换器

各进制数互转换器

XML、JSON 在线转换

XML、JSON 在线转换

在线XML、JSON转换工具