Skip to main content

ZREMRANGEBYRANK

Note

Official reference: ZREMRANGEBYRANK.

Remove members in a rank range.

Syntax​

ZREMRANGEBYRANK key start stop

Ranks are zero-based and the end position is inclusive; negative indices count from the end.

Results​

ReturnRowsContent
Update count--Number of members removed from the sorted set, not including non-existing members.

Example​

ZADD demo:ranking 10 alice 20 bob
ZREMRANGEBYRANK demo:ranking 0 0