redis collection set command

sadd key member1 [member2] to add one or more members to the collection

scard key to obtain the number of members of the collection

sdiff key1 key2 key1 return element not present in the other set

sdiffstore destination key1 key2 key3 key1 return elements are not present in the other set and stored in the destination

sinter key1 [key2] key1 Returns the element present in the other set

sinterstore destination key1 key2 key3 key1 return element is present in the other information and stored in the destination

sismember key member to determine whether the member is a member of the set of key elements of 1

smembers key return all the members of the collection

SMOVE source destination member to the collection member moves elements from the source destination set

spop key is removed and returns a random element in the set

srandmember key [count] returns a collection of random numbers to count

srem key member1 [member2] to remove one or more members of the set of

sunion key1 key2 return all of the given set and set

sunionstore destination key1 [key2] and the set of all sets stored in the destination set

 

Guess you like

Origin www.cnblogs.com/caojuansh/p/11276608.html