Redis Data Types Cheat Sheet/Store union result

Write the union into a destination set.

Section: Sets

Store union result

bash
bash
SUNIONSTORE result:set set:a set:b

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Sets
Union sets
Return members from either set.
OpenIn sheetbashsame section
Add members to a set
Insert unique set members.
OpenIn sheetbashsame section
Remove members from a set
Remove members from a set.
OpenIn sheetbashsame section
List all members
Return every member of a set.
OpenIn sheetbashsame section
Get set size
Return the number of unique members.
OpenIn sheetbashsame section
Check membership
Return whether a member exists in the set.
OpenIn sheetbashsame section