Sunday, 12 April 2015

SDIFFSTORE destination key1 key2 ...keyN

Syntax
SDIFFSTORE destination key1 key2 ...keyN
   Save the members of the set resulting from the difference between the first set and all the successive sets to the destination.

Returns
Returns the number of elements in the resulting set.

127.0.0.1:6379> sadd set1 2 4 6 8 
(integer) 4 
127.0.0.1:6379> sadd set2 1 3 5 7 4 6 
(integer) 6 
127.0.0.1:6379> sadd set3 1 3 5 7 4 
(integer) 5 
127.0.0.1:6379> sdiffstore result set1 set2 set3 
(integer) 2 
127.0.0.1:6379> smembers result 
1) "2" 
2) "8" 
127.0.0.1:6379> 

 
Prevoius                                                 Next                                                 Home

No comments:

Post a Comment