English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Redis Sorted Sets (sorted set)
The Redis Zremrangebyscore command is used to remove all members from the sorted set within the specified score (score) range.
redis Zremrangebyscore The basic syntax of the command is as follows:
redis 127.0.0.1:6379> ZREMRANGEBYSCORE key min max
>= 1.2.0
The number of removed members.
redis 127.0.0.1:6379> ZRANGE salary 0 -1 WITHSCORES # Display all members of the sorted set and their score values 1) "tom" 2) "2000" 3) "peter" 4) "3500" 5) "jack" 6) "5000" redis 127.0.0.1:6379> ZREMRANGEBYSCORE salary 1500 3500 # Remove all salaries in 1500 to 3500 Employees within (integer) 2 redis> ZRANGE salary 0 -1 WITHSCORES # The remaining members of the sorted set 1) "jack" 2) "5000"
Redis Sorted Sets (sorted set)