Sets Sinter
# Redis Sinter Command
[!(#) Redis Sets](#)
The Redis Sinter command returns the intersection of all given sets. Non-existent set keys are treated as empty sets. When any of the given sets is empty, the result is also an empty set (according to set operation laws).
### Syntax
The basic syntax of Redis Sinter command is:
redis 127.0.0.1:6379> SINTER KEY KEY1..KEYN
### Available Version
>= 1.0.0
### Return Value
A list of intersection members.
### Example
redis 127.0.0.1:6379> SADD myset "hello"(integer) 1 redis 127.0.0.1:6379> SADD myset "foo"(integer) 1 redis 127.0.0.1:6379> SADD myset "bar"(integer) 1 redis 127.0.0.1:6379> SADD myset2 "hello"(integer) 1 redis 127.0.0.1:6379> SADD myset2 "world"(integer) 1 redis 127.0.0.1:6379> SINTER myset myset2 1) "hello"
[!(#) Redis Sets](#)
YouTip