Sorted Sets Zremrangebyscore
π
2026-06-14 | π Redis
Redis Zremrangebyscore Command | Rookie Tutorial
# Redis Zremrangebyscore Command | Rookie Tutorial
# [Rookie Tutorial -- Learning is not only about technology, but also about dreams!](#)
* (javascript:void(0);)
* (javascript:void(0);)
* (javascript:void(0);)
* (javascript:void(0))
Redis Tutorial
(#)(#)(#)(#)(#)
## Redis Commands
(#)(#)(#)(#)(#)(#)(#)(#)[Redis Pub/Sub](#)(#)(#)(#)(#)(#)(#)
## Redis Advanced Tutorial
[Redis Backup & Recovery](#)(#)(#)(#)(#)(#)(#)(#)
[](#)(#)
(#)[](#)
# Redis Zremrangebyscore Command
!(#)(#)
The Redis Zremrangebyscore command is used to remove all members in a sorted set within a specified score (score) range.
### Syntax
The basic syntax of the redis Zremrangebyscore command is as follows:
redis 127.0.0.1:6379> ZREMRANGEBYSCORE key min max
### Available Version
>= 1.2.0
### Return Value
The number of removed members.
### Example
redis 127.0.0.1:6379> ZRANGE salary 0 -1 WITHSCORES # Display all members and their score values in the sorted set1) "tom"2) "2000"3) "peter"4) "3500"5) "jack"6) "5000" redis 127.0.0.1:6379> ZREMRANGEBYSCORE salary 1500 3500 # Remove all employees with salaries between 1500 and 3500(integer) 2 redis> ZRANGE salary 0 -1 WITHSCORES # Remaining sorted set members1) "jack"2) "5000"
!(#)(#)
AI is thinking...
[](#)(#)
(#)[](#)