SUNIONSTORE destination key [key …]

    Time complexity: O(N) where N is the total number of elements in all given sets.

    This command is equal to , but instead of returning the resulting set, it is stored in .

    If destination already exists, it is overwritten.

    *Examples

    redis> SADD key1 "a"

    redis> SADD key1 "b"

      redis> SADD key1 "c"

      1. (integer) 1

      redis> SADD key2 "d"

      redis> SADD key2 "e"

      1. (integer) 1

      redis> SUNIONSTORE key key1 key2

      1. 2) "c"
      2. 3) "d"
      3. 5) "e"
      redis>