Redis Zcount 命令
Redis 教程
· 2019-03-07 20:27:35
Redis Zcount 命令用于计算有序集合中指定分数区间的成员数量。
语法
redis Zcount 命令基本语法如下:
redis 127.0.0.1:6379> ZCOUNT key min max
可用版本
>= 2.0.0
返回值
分数值在 min 和 max 之间的成员的数量。
实例
redis 127.0.0.1:6379> ZADD myzset 1 "hello" (integer) 1 redis 127.0.0.1:6379> ZADD myzset 1 "foo" (integer) 1 redis 127.0.0.1:6379> ZADD myzset 2 "world" 3 "bar" (integer) 2 redis 127.0.0.1:6379> ZCOUNT myzset 1 3 (integer) 4
点击查看所有 Redis 教程 文章: https://www.codercto.com/courses/l/33.html
The Linux Programming Interface
Michael Kerrisk / No Starch Press / 2010-11-6 / GBP 79.99
The Linux Programming Interface describes the Linux API (application programming interface)-the system calls, library functions, and other low-level interfaces that are used, directly or indirectly, b......一起来看看 《The Linux Programming Interface》 这本书的介绍吧!