smismember.3valkey - Man Page
Determines whether multiple members belong to a set.
Synopsis
SMISMEMBER
key member [member...]
Description
Returns whether each member
is a member of the set stored at key
.
For every member
, 1
is returned if the value is a member of the set, or 0
if the element is not a member of the set or if key
does not exist.
Reply
valkey-protocol(7) Array reply: a list representing the membership of the given elements, in the same order as they are requested.
Complexity
O(N) where N is the number of elements being checked for membership
Acl Categories
@fast @read @set
History
- Available since: 6.2.0
Examples
127.0.0.1:6379> SADD myset "one" (integer) 1 127.0.0.1:6379> SADD myset "one" (integer) 0 127.0.0.1:6379> SMISMEMBER myset "one" "notamember" 1) (integer) 1 2) (integer) 0
See Also
sadd(3valkey), scard(3valkey), sdiff(3valkey), sdiffstore(3valkey), sinter(3valkey), sintercard(3valkey), sinterstore(3valkey), sismember(3valkey), smembers(3valkey), smove(3valkey), spop(3valkey), srandmember(3valkey), srem(3valkey), sscan(3valkey), sunion(3valkey), sunionstore(3valkey)