
- Redis Basics
- Redis - Home
- Redis - Overview
- Redis - Environment
- Redis - Configuration
- Redis - Data types
- Redis Commands
- Redis - Commands
- Redis - Keys
- Redis - Strings
- Redis - Hashes
- Redis - Lists
- Redis - Sets
- Redis - Sorted Sets
- Redis - HyperLogLog
- Redis - Publish Subscribe
- Redis - Transactions
- Redis - Scripting
- Redis - Connections
- Redis - Server
- Redis Advanced
- Redis - Backup
- Redis - Security
- Redis - Benchmarks
- Redis - Client Connection
- Redis - Pipelining
- Redis - Partitioning
- Redis - Java
- Redis - Php
- Redis Useful Resources
- Redis - Quick Guide
- Redis - Useful Resources
- Redis - Discussion
Redis - Set Sismember Command
Redis SISMEMBER returns an element that already exists in the set stored at the key or not.
Return Value
Integer reply
- 1, if the element is a member of the set.
- 0, if the element is not a member of the set, or if the key does not exist.
Syntax
Following is the basic syntax of Redis SISMEMBER command.
redis 127.0.0.1:6379> SISMEMBER KEY VALUE
Example
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_sets.htm
Advertisements