SUNION

Since 1.1.0Sets

Syntax

SUNION key [key ...]
  • Flags: readonly
  • ACL categories: @read, @set, @slow
  • Arity: -2

Returns the members that are in any of the given sets. A key that does not exist is an empty set.

Reply

  • An array of members, in no particular order.

Examples

> SADD x a b c d
(integer) 4
> SADD y c d e
(integer) 3
> SUNION x y
1) "c"
2) "a"
3) "b"
4) "e"
5) "d"