summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/srem.md
blob: fca5b75d3ca4dab29f085447159ac63b87fc08e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Remove the specified members from the set stored at `key`.
Specified members that are not a member of this set are ignored.
If `key` does not exist, it is treated as an empty set and this command returns
`0`.

An error is returned when the value stored at `key` is not a set.

@return

@integer-reply: the number of members that were removed from the set, not
including non existing members.

@examples

```cli
SADD myset "one"
SADD myset "two"
SADD myset "three"
SREM myset "one"
SREM myset "four"
SMEMBERS myset
```