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://codercto.com/courses/l/33.html
The Four
Scott Galloway / Portfolio / 2017-10-3 / USD 28.00
NEW YORK TIMES BESTSELLER USA TODAY BESTSELLER Amazon, Apple, Facebook, and Google are the four most influential companies on the planet. Just about everyone thinks they know how they got there.......一起来看看 《The Four》 这本书的介绍吧!