redis Redis Set Datatype

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Redis supports a set datatype analogous to mathematical sets for modeling data in the database. Sets are a compound datatype consisting of a group of unique, unordered members. Sets support adding and removing members, size operations, as well as combination operations that take two sets and generate a third set. Sets in Redis are similar to Sets in most programming languages.

Syntax

  • SADD key member [member ...]
  • SISMEMBER key member
  • SCARD key
  • SADD key member [member ...]

Remarks

The full documentation on the Redis set datatype can be found at Redis.io.



Got any redis Question?