redis SDIFF command


  Translation results:

diff

UK['dɪf] US['dɪf]

abbr.differential differential (of);difference different;differ different;differentiator differentiator

redis SDIFF commandsyntax

Function: Returns all members of a set, which is the difference between all given sets. Keys that do not exist are treated as empty sets.

Syntax: SDIFF key [key ...]

Available versions: >= 1.0.0

Time complexity: O(N), N is the sum of the number of members of all given sets.

Returns: The list of intersection members.

redis SDIFF commandexample

redis> SMEMBERS peter's_movies
1) "bet man"
2) "start war"
3) "2012"
redis> SMEMBERS joe's_movies
1) "hi, lady"
2) "Fast Five"
3) "2012"
redis> SDIFF peter's_movies joe's_movies
1) "bet man"
2) "start war"

Home

Videos

Q&A