Skip to main content

ZDIFFSTORE

Note

Official reference: ZDIFFSTORE.

Store a sorted-set difference.

Syntax

ZDIFFSTORE destination numkeys key [key ...]

numkeys must match the number of following source keys.

The result overwrites the destination; an empty result removes it.

Results

ReturnRowsContent
Update count--Number of elements in the resulting sorted set.

Example

ZADD demo:ranking 10 alice 20 bob
ZADD demo:other 30 alice
ZDIFFSTORE demo:diff 2 demo:ranking demo:other