SINTER

Since 1.1.0Sets

Syntax

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

Returns the members that are in every one of the given sets. A key that does not exist is an empty set, so the result is empty.

Reply

  • An array of members, in no particular order.
  • A WRONGTYPE error if a key is not a set.

Examples

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