- Redis Basics
- Redis - Home
- Redis - Overview
- Redis - Environment
- Redis - Configuration
- Redis - Data types
- Redis Commands
- Redis - Commands
- Redis - Keys
- Redis - Strings
- Redis - Hashes
- Redis - Lists
- Redis - Sets
- Redis - Sorted Sets
- Redis - HyperLogLog
- Redis - Publish Subscribe
- Redis - Transactions
- Redis - Scripting
- Redis - Connections
- Redis - Server
- Redis Advanced
- Redis - Backup
- Redis - Security
- Redis - Benchmarks
- Redis - Client Connection
- Redis - Pipelining
- Redis - Partitioning
- Redis - Java
- Redis - Php
- Redis Useful Resources
- Redis - Quick Guide
- Redis - Useful Resources
- Redis - Discussion
Redis - Keys Type Command
Redis TYPE command is used to get the data type of the value stored in the key.
Return Value
String reply, data type of the value stored in the key or none.
Syntax
Following is the basic syntax of Redis TYPE command.
redis 127.0.0.1:6379> TYPE KEY_NAME
Example
First, create some keys in Redis and set some values in it.
redis 127.0.0.1:6379> SET tutorial1 redis OK
Now, check the type of the key.
redis 127.0.0.1:6379> TYPE tutorial1 string
redis_keys.htm
Advertisements