您当前的位置:首页 > 电脑办公 > Linux教程
| PPT | 电脑打字 | 计算机基础 | word | excel | Linux教程 |

自学教程:Redis Sunionstore 命令

51自学网 2023-01-16 20:09:37
  Linux教程
这篇教程Redis Sunionstore 命令写得很实用,希望能帮到您。

Redis Sunionstore 命令将给定集合的并集存储在指定的集合 destination 中。如果 destination 已经存在,则将其覆盖。

语法

redis Sunionstore 命令基本语法如下:

redis 127.0.0.1:6379> SUNIONSTORE DESTINATION KEY KEY1..KEYN

可用版本

>= 1.0.0

返回值

结果集中的元素数量。

实例

redis 127.0.0.1:6379> SADD myset1 "hello"(integer) 1redis 127.0.0.1:6379> SADD myset1 "world"(integer) 1redis 127.0.0.1:6379> SADD myset1 "bar"(integer) 1redis 127.0.0.1:6379> SADD myset2 "hello"(integer) 1redis 127.0.0.1:6379> SADD myset2 "bar"(integer) 1redis 127.0.0.1:6379> SUNIONSTORE myset myset1 myset2(integer) 1redis 127.0.0.1:6379> SMEMBERS myset1) "bar"2) "world"3) "hello"4) "foo"

Redis Sunion 命令
Redis Sscan 命令

51自学网,即我要自学网,自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1