ZRANGESTORE

Stores a rank range from a sorted set in a destination key.

Sorted sets · Example verified

Syntax covered here

ZRANGESTORE destination source start stop

The case selects the entire source with bounds 0 and -1 and reports the stored member count.

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
> ZADD scores 1 a 2 b
2
# connection: default
> ZRANGESTORE result scores 0 -1
2