SADD

Adds a member to a set.

Sets · Example verified

Syntax covered here

SADD key member

The cases create a set and then add a distinct member, counting each new insertion.

Tested example & replies

Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.

# connection: default
> SADD team a
1
# connection: default
> SADD team b
1