HEXISTS

Syntax
HEXISTS key field
Available since:
Redis Open Source 2.0.0
Time complexity:
O(1)
ACL categories:
@read, @hash, @fast,
Compatibility:
Redis Enterprise and Redis Cloud compatibility

Returns if field is an existing field in the hash stored at key.

Examples

HSET myhash field1 "foo" HEXISTS myhash field1 HEXISTS myhash field2

Redis Enterprise and Redis Cloud compatibility

Redis
Enterprise
Redis
Cloud
Notes
✅ Standard
✅ Active-Active
✅ Standard
✅ Active-Active

Return information

One of the following:

  • Integer reply: 0 if the hash does not contain the field, or the key does not exist.
  • Integer reply: 1 if the hash contains the field.
RATE THIS PAGE
Back to top ↑