- 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 - Hash Hget Command
Redis HGET command is used to get the value associated with the field in the hash stored at the key.
Return Value
String reply, the value associated with the field. Nil, when the field is not present in the hash or the key does not exist.
Syntax
Following is the basic syntax of Redis HGET command.
redis 127.0.0.1:6379> HGET KEY_NAME FIELD_NAME
Example
redis 127.0.0.1:6379> HSET myhash field1 "foo" (integer) 1 redis 127.0.0.1:6379> HGET myhash field1 "foo" redis 127.0.0.1:6379> HEXISTS myhash field2 (nil)
redis_hashes.htm
Advertisements