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

Introduction to Algorithms, 3rd Edition

Introduction to Algorithms, 3rd Edition

Thomas H. Cormen、Charles E. Leiserson、Ronald L. Rivest、Clifford Stein / The MIT Press / 2009-7-31 / USD 94.00

Some books on algorithms are rigorous but incomplete; others cover masses of material but lack rigor. Introduction to Algorithms uniquely combines rigor and comprehensiveness. The book covers a broad ......一起来看看 《Introduction to Algorithms, 3rd Edition》 这本书的介绍吧!

UNIX 时间戳转换

UNIX 时间戳转换

UNIX 时间戳转换

RGB HSV 转换

RGB HSV 转换

RGB HSV 互转工具

HEX CMYK 转换工具

HEX CMYK 转换工具

HEX CMYK 互转工具