TYPE key
Time complexity: O(1)
Returns the string representation of the type of the value stored at . The different types that can be returned are: string
, list
, , zset
, hash
and .
*Examples
redis> SET key1 "value"
redis> LPUSH key2 "value"
- (integer) 1
redis> TYPE key1
redis> TYPE key2
redis>
- "set"