Sets Smembers
# Redis SMEMBERS Command
[!(#) Redis Sets](#)
The Redis SMEMBERS command returns all members of the set stored at key. A non-existent key is treated as an empty set.
### Syntax
The basic syntax for the Redis SMEMBERS command is as follows:
redis 127.0.0.1:6379> SMEMBERS key
### Available Since
>= 1.0.0
### Return Value
All members of the set.
### Example
redis 127.0.0.1:6379> SADD myset1 "hello"(integer) 1 redis 127.0.0.1:6379> SADD myset1 "world"(integer) 1 redis 127.0.0.1:6379> SMEMBERS myset1 1) "World"2) "Hello"
[!(#) Redis Sets](#)
YouTip