# SISMEMBER

> Check whether a value is a member of a set.

URL: https://docs.hotkv.com/commands/sismember/

```
SISMEMBER key member
```

- Group: Set
- Complexity: O(1)
- HotKV Cloud: all plans
- On-Premise: no license needed

`SISMEMBER` tells you whether `member` is in the set stored at `key`. To check
several members in one call, use [SMISMEMBER](https://docs.hotkv.com/commands/smismember/index.md).

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Member of the set | Integer `1` | Same |
| Not a member, or key does not exist | Integer `0` | Same |

`SISMEMBER` replies with a `WRONGTYPE` error if `key` holds a value that is not
a set.

## Examples

```
127.0.0.1:6379> SADD tags "redis"
(integer) 1
127.0.0.1:6379> SISMEMBER tags "redis"
(integer) 1
127.0.0.1:6379> SISMEMBER tags "mysql"
(integer) 0
```

## Compatibility

Same as Redis 7.4 and Valkey 8.

## See also

[SMISMEMBER](https://docs.hotkv.com/commands/smismember/index.md), [SMEMBERS](https://docs.hotkv.com/commands/smembers/index.md), [SADD](https://docs.hotkv.com/commands/sadd/index.md)