- 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 - String Get Command
Redis GET command is used to get the value stored in the specified key. If the key does not exist, then nil is returned. If the returned value is not a string, then error is returned.
Return Value
Simple string reply. Value or key or nil.
Syntax
Following is the basic syntax of Redis GET command.
redis 127.0.0.1:6379> GET KEY_NAME
Example
First, set a key in Redis and then get it.
redis 127.0.0.1:6379> SET tutorialspoint redis OK redis 127.0.0.1:6379> GET tutorialspoint "redis"
redis_strings.htm
Advertisements