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

查看所有标签

Basics of Web Design

Basics of Web Design

Terry Felke-Morris / Addison-Wesley / 2013-1-28 / USD 98.40

Basics of Web Design: HTML5 and CSS3, 2e covers the basic concepts that web designers need to develop their skills: * Introductory Internet and Web concepts* Creating web pages with HTML5* Configurin......一起来看看 《Basics of Web Design》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具