What is the difference between HSET and HMSET method in redis database

前端 未结 3 1532
被撕碎了的回忆
被撕碎了的回忆 2021-02-01 12:11

In my application im using redis database.I have gone through their documentation but i couldn\'t find the difference between HSET and HMSET.

3条回答
  •  死守一世寂寞
    2021-02-01 12:42

    HSET key field value:

    Sets field in the hash stored at key to value. If key does not exist, a new key holding a hash is created. If field already exists in the hash, it is overwritten.

    HMSET key field value [field value ...]

    Sets the specified fields to their respective values in the hash stored at key. This command overwrites any existing fields in the hash. If key does not exist, a new key holding a hash is created.

    For more redis commands information, click here.

提交回复
热议问题