Redis Scard 命令

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

Redis Scard 命令返回集合中元素的数量。

语法

redis 127.0.0.1:6379> SCARD KEY_NAME 

返回值

集合的数量。 当集合 key 不存在时,返回 0 。

实例

redis 127.0.0.1:6379> SADD myset "hello"
(integer) 1
redis 127.0.0.1:6379> SADD myset "foo"
(integer) 1
redis 127.0.0.1:6379> SADD myset "hello"
(integer) 0
redis 127.0.0.1:6379> SCARD myset
(integer) 2

查看更多 Redis 集合(Set)命令

Hit Refresh

Hit Refresh

Satya Nadella、Greg Shaw / HarperBusiness / 2017-9-26 / USD 20.37

Hit Refresh is about individual change, about the transformation happening inside of Microsoft and the technology that will soon impact all of our lives—the arrival of the most exciting and disruptive......一起来看看 《Hit Refresh》 这本书的介绍吧!

CSS 压缩/解压工具

CSS 压缩/解压工具

在线压缩/解压 CSS 代码

在线进制转换器

在线进制转换器

各进制数互转换器

HEX HSV 转换工具

HEX HSV 转换工具

HEX HSV 互换工具