Redis Sismember 命令

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

Redis Sismember 命令判断成员元素是否是集合的成员。

语法

redis 127.0.0.1:6379> SISMEMBER KEY VALUE 

返回值

如果成员元素是集合的成员,返回 1 。 如果成员元素不是集合的成员,或 key 不存在,返回 0 。

实例

redis 127.0.0.1:6379> SADD myset1 "hello"
(integer) 1
redis 127.0.0.1:6379> SISMEMBER myset1 "hello"
(integer) 1
redis 127.0.0.1:6379> SISMEMBER myset1 "world"
(integer) 0

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

Programming Python

Programming Python

Mark Lutz / O'Reilly Media / 2006-8-30 / USD 59.99

Already the industry standard for Python users, "Programming Python" from O'Reilly just got even better. This third edition has been updated to reflect current best practices and the abundance of chan......一起来看看 《Programming Python》 这本书的介绍吧!

JSON 在线解析

JSON 在线解析

在线 JSON 格式化工具

URL 编码/解码

URL 编码/解码

URL 编码/解码

SHA 加密

SHA 加密

SHA 加密工具