Redis Scard 命令
Redis 教程
· 2019-03-07 16:26:54
Redis Scard 命令返回集合中元素的数量。
语法
redis Scard 命令基本语法如下:
redis 127.0.0.1:6379> SCARD KEY_NAME
可用版本
>= 1.0.0
返回值
集合的数量。 当集合 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 教程 文章: https://www.codercto.com/courses/l/33.html
Powerful
Patty McCord / Missionday / 2018-1-25
Named by The Washington Post as one of the 11 Leadership Books to Read in 2018 When it comes to recruiting, motivating, and creating great teams, Patty McCord says most companies have it all wrong. Mc......一起来看看 《Powerful》 这本书的介绍吧!