Redis TYPE – How to get datatype of value store in key
2 months ago Lalit Bhagtani 0
In this tutorial, we will learn about how to get the datatype of a value store in the key. Values in redis datastore can be of different datatype like String, List, Set, Sorted Set etc. To get the data type of a value, we will use the COMMAND – TYPE in redis-cli. The syntax of redis TYPE command is as follows :-
redis host:post> TYPE <key name>
- string representing data type of a value. - none, if key does not exist.
That’s all for how to get datatype of value store in the key in redis datastore. If you liked it, please share your thoughts in comments section and share it with others too.