Redis Zcount 命令

更新时间: 2019-07-07 15:54

Redis Zcount 命令用于计算有序集合中指定分数区间的成员数量。

语法

redis 127.0.0.1:6379> ZCOUNT key min max

返回值

分数值在 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 有序集合(sorted set)命令

Head First Mobile Web

Head First Mobile Web

Lyza Danger Gardner、Jason Grigsby / O'Reilly Media / 2011-12 / $ 50.84

Despite the huge number of mobile devices and apps in use today, your business still needs a website. You just need it to be mobile. Head First Mobile Web walks you through the process of making a con......一起来看看 《Head First Mobile Web》 这本书的介绍吧!

JS 压缩/解压工具

JS 压缩/解压工具

在线压缩/解压 JS 代码

XML、JSON 在线转换

XML、JSON 在线转换

在线XML、JSON转换工具

HSV CMYK 转换工具

HSV CMYK 转换工具

HSV CMYK互换工具