content/commands/type.md
Returns the string representation of the type of the value stored at key.
The different types that can be returned are: string, list, set, zset,
hash, stream, and vectorset.
{{% redis-cli %}} SET key1 "value" LPUSH key2 "value" SADD key3 "value" TYPE key1 TYPE key2 TYPE key3 {{% /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="type-return-info" tab1="RESP2" tab2="RESP3" >}}
Simple string reply: the type of key, or none when key doesn't exist.
-tab-sep-
Simple string reply: the type of key, or none when key doesn't exist.
{{< /multitabs >}}