SMEMBERS

AttentionThis page documents an earlier version. Go to the latest (v2.1)version.

Synopsis

SMEMBERS keyThis command selects all members of the set that is associated with the given key.

  • If key is associated with a value that is not a set, an error is raised.
  • If key does not exist, no value is returned.

Return Value

Returns all members of the given set.

Examples

  1. $ SADD yuga_world "Africa"
  1. 1
  1. $ SADD yuga_world "America"
  1. 1
  1. $ SMEMBERS yuga_world
  1. 1) "Africa"
  2. 2) "America"

See Also

sadd, scard, sismember, srem