HsetCommand: Contents
HSET _key_ _field_ _value_ (Redis >
Return value

# HsetCommand

ï»¿#sidebar HashCommandsSidebar

# HSET _key_ _field_ _value_ (Redis >

1.3.10)= Time complexity: O(1)

> Set the specified hash field to the specified value.

> If key does not exist, a new key holding a hash is created.

> If the field already exists, and the HSET just produced an update of thevalue, 0 is returned, otherwise if a new field is created 1 is returned.

## Return value

Integer reply