Redis common Commands (-)

Source: Internet
Author: User

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 (-)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.