sismember.3valkey - Man Page

Determines whether a member belongs to a set.

Synopsis

SISMEMBER key member

Description

Returns if member is a member of the set stored at key.

Reply

One of the following:

Complexity

O(1)

Acl Categories

@fast @read @set

History

Examples

127.0.0.1:6379> SADD myset "one"
(integer) 1
127.0.0.1:6379> SISMEMBER myset "one"
(integer) 1
127.0.0.1:6379> SISMEMBER myset "two"
(integer) 0

See Also

sadd(3valkey), scard(3valkey), sdiff(3valkey), sdiffstore(3valkey), sinter(3valkey), sintercard(3valkey), sinterstore(3valkey), smembers(3valkey), smismember(3valkey), smove(3valkey), spop(3valkey), srandmember(3valkey), srem(3valkey), sscan(3valkey), sunion(3valkey), sunionstore(3valkey)

Info

2024-09-23 8.0.0 Valkey Command Manual