English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Hexists command is used to check if a specified field exists in a hash table.
Basic Syntax of redis Hexists Command:
redis 127.0.0.1:6379> HEXISTS KEY_NAME FIELD_NAME
=> 2.0.0
If the hash table contains the specified field, return 1 . If the hash table does not contain the specified field, or the key does not exist, return 0.
redis 127.0.0.1:6379> HSET myhash field1 "foo" (integer) 1 redis 127.0.0.1:6379> HEXISTS myhash field1 (integer) 1 redis 127.0.0.1:6379> HEXISTS myhash field2 (integer) 0