YouTip LogoYouTip

Sorted Sets Zrevrange

Here's the translated HTML content with all code blocks preserved and only Chinese text translated: # Redis Zrevrange Command | Novice Tutorial # [Novice Tutorial -- Learning More Than Technology, It's 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](#)(#)(#)(#)(#)(#)(#)(#) [](#)(#) (#)[](#) In-Depth Exploration Computer Computer Hardware AI Tools, Chatbots and Virtual Assistants Scripting Scripting Languages Networking Data Management Programming Web Applications and Online Tools # Redis Zrevrange Command !(#)(#) The Redis Zrevrange command returns the specified range of members in a sorted set. Members are ordered from the highest to the lowest score. Members with the same score are ordered in reverse lexicographical order. Except for the ordering being from high to low scores, ZREVRANGE is similar to (#). ### Syntax The basic syntax of redis Zrevrange command is as follows: redis 127.0.0.1:6379> ZREVRANGE key start stop ### Available Versions >= 1.2.0 ### Return Value A list of members in the specified range, optionally with their scores. ### Examples redis 127.0.0.1:6379> ZRANGE salary 0 -1 WITHSCORES # Ascending order1) "peter"2) "3500"3) "tom"4) "4000"5) "jack"6) "5000" redis 127.0.0.1:6379> ZREVRANGE salary 0 -1 WITHSCORES # Descending order1) "jack"2) "5000"3) "tom"4) "4000"5) "peter"6) "3500" !(#)(#)
← Sorted Sets ZrevrangebyscoreSorted Sets Zremrangebyscore β†’