content/commands/scard.md
Returns the set cardinality (number of elements) of the set stored at key.
{{% redis-cli %}} SADD myset "Hello" SADD myset "World" SCARD myset {{% /redis-cli %}}
| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | |
{{< multitabs id="scard-return-info" tab1="RESP2" tab2="RESP3" >}}
Integer reply: the cardinality (number of elements) of the set, or 0 if the key does not exist.
-tab-sep-
Integer reply: The cardinality (number of elements) of the set, or 0 if the key does not exist.
{{< /multitabs >}}