Hash hash data type related commands hset key field value function: Set the values of the filed field in key to value note: If there is no field field, add directly, if any, overwrite the value of the original Field field Hmset key Field1 value1 [ Field2 value2 field3 value3 ... fieldn Valuen] Function: Set field1->n domain, corresponding value is value1->n (corresponding to PHP understood as $key = Array (file1 =>value1, field2=>value2 .... fieldn=>valuen)) Hget key field function: Returns the value of Field field in key Hmget key field1 Field2 effect: Returns the value of the Field1 field2 fieldn field in key Hgetall key function: Returns key, all fields with their Value Hdel key field function: Delete key in field field Hlen key function: Returns the number of elements in key hexists Key field function: Determine if there is no field field in key Hinrby key field value function: is to put the value of field field in key increment integer value Valuehinrby float key field value function: is to increase the value of the Field field in key by floating-point value Valuehkeys key: Returns all the Fieldkvals key functions in key: Returns all the value in key
Hash structure and command in Redis