ZDIFFSTORE

Since 1.1.0Sorted sets

Syntax

ZDIFFSTORE destination numkeys key [key ...]
  • Flags: movablekeys, write
  • ACL categories: @slow, @sortedset, @write
  • Arity: -4

Stores what ZDIFF would return at destination, replacing whatever was there.

Reply

  • The number of members stored.

Examples

> ZADD s1 1 a 2 b 3 c
(integer) 3
> ZADD s2 10 b 20 c
(integer) 2
> ZDIFFSTORE out3 2 s1 s2
(integer) 1