1. Assignment, value, delete (String type) Set key value get key del Key2. Incrementing the number INCR KEY&N Bsp Incrby Key increment Incrby is basically the same as the INCR command, Incrby can specify the value to increment each time by increment. 3. Reduce the specified integer DECR key Decrby key decrement Decrby and DECR command basically the same as incrby4. Increase specified floating point number Incrbyfloat by increment can increment a double-precision floating-point number of 5. Append value to tail Append key value Append value to the end of the key value, equivalent to set key value6. Get string length strlen key &N Bsp Returns the length of the key value, or 07 if the key does not exist. Get/Set multiple values at the same time mget key [key ...] Mset key value [key value ...] Mget/mset is similar to Get/set, but Mget/mset can get/set key values for multiple keys at the same time 8. Bit operation getbit key offset Setbit & Nbsp;key offset value Bitcount key [start] [end] bitop operation Destkey key [key ....] --------------------------------------------------------------------------------------------------------- -------------------9. Assignment andValue (hash type) hset key field value Hget key filed hmset key field value [fi Eld value ...] hmget key field [field ...] Hgetall key Hset does not differentiate between insert and update operations, the insert operation returns 1 successfully, the update returns successfully 0 hmset multi-Field Operation 10. Determine if a field exists hexists key filed Determines whether a field exists, returns 1 if it exists, or returns 0 if the key does not exist, and returns 011. Assignment when a field does not exist hsetnx key field value HSETNX is similar to Hset, except that HSETNX will not perform any action 12 if the field already exists. Add digital Hincrby by field increment hash type there is no HINCR command, which can be achieved by Hincrby key Field 1 implementation 13. Delete fields hdel key field [field ...] Hdel can delete one or more fields, and the return value is 14 of the number of deleted fields. Get only field names or field values Hkeys key hvals key15. Get the number of fields Hlen key
Redis Common Commands (-)