English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis SMEMBERS command returns all members in the set. A non-existent key is considered as an empty set.
Basic Syntax of Redis SMEMBERS Command
redis 127.0.0.1:6379> SMEMBERS key
>= 1.0.0
All members in the set.
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"