小白教程
所有教程
关于
Search
172.69.59.134
172.69.59.134
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Sets sunionstore”的源代码
本页内容
上一节:
Sets_sunion
下一节:
Sets_sscan
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:SUNIONSTORE destination key1 [key2]}}[[Category:redis sets|14]] = Redis Sunionstore 命令 = [[redis sets|Redis 集合(Set)]] Redis Sunionstore 命令将给定集合的并集存储在指定的集合 destination 中。如果 destination 已经存在,则将其覆盖。 === 语法 === redis Sunionstore 命令基本语法如下: <sample title="" desc="" lang="redis" hererun="1"> SUNIONSTORE destination key [key ...] </sample> === 可用版本 === >= 1.0.0 === 返回值 === 结果集中的元素数量。 == <sample title="" desc="" lang="redis" hererun="1"> 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> SUNIONSTORE key key1 key2 (integer) 5 redis> SMEMBERS key 1) "c" 2) "b" 3) "e" 4) "d" 5) "a" redis> </sample> [[redis sets|Redis 集合(Set)]]
返回至“
Sets sunionstore
”。
上一节:
Sets_sunion
下一节:
Sets_sscan