Returns all members of a set.
SMEMBERS
key
Returns all the members of the set value stored at
key
.
This has the same effect as running SINTER
with one
argument key
.
Array reply: all members of the set.
Set reply: all members of the set.
O(N) where N is the set cardinality.
@read @set @slow
127.0.0.1:6379> SADD myset "Hello"
(integer) 1
127.0.0.1:6379> SADD myset "World"
(integer) 1
127.0.0.1:6379> SMEMBERS myset
1) "Hello"
2) "World"
SADD, SCARD, SDIFF, SDIFFSTORE, SINTER, SINTERCARD, SINTERSTORE, SISMEMBER, SMISMEMBER, SMOVE, SPOP, SRANDMEMBER, SREM, SSCAN, SUNION, SUNIONSTORE.